nefu 702 The minimum square sum

#include <iostream>

using namespace std;

int main()
{
    long long  m;
    while(cin>>m)
    {
        if(m%4==1||m==2)
            cout<<m<<endl;
        else
            cout<<2*m*m<<endl;
    }
    return 0;
}

你可能感兴趣的:(nefu 702 The minimum square sum)