小P的疑惑
小P的疑惑
题解,很明显,可以推出,。
源码
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;
const LL mo=10000007;
LL q,n;
#define gc() getchar()
template<typename _T>
inline void read(_T &x)
{
    _T f=1;x=0;char s=gc();
    while(s>'9'||s<'0'){if(s=='-')f=-1;s=gc();}
    while(s>='0'&&s<='9'){x=(x<<3)+(x<<1)+(s^48);s=gc();}
    x*=f;
}
int main()
{
	freopen("puzzle.in","r",stdin);
	freopen("puzzle.out","w",stdout);
	read(q);
	while(q--)
	{
		read(n);
		printf("%lld\n",n*n%mo);
	}
    return 0;
} 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号