@root

12121 Game for peace 2024-07-12 20:49:03 2024-07-12 20:49:47 6

WA??? 60分???

#include<iostream>
using namespace std;
int main()
{
    int a[30];
    int b[30];
    int i;
    int temp = 1;
    int n = 1;
    for(i=0;i<30;i++)
    {
        a[i] = temp;
        b[i] = n;
        n*=2;
        temp+=n;
    }
    cin>>n;
    cout<<b[n-1]<<" "<<a[n-1]<<endl;
    return 0;
}
{{ vote && vote.total.up }}