标签:problem span printf long .com lan ret clu pre
水水水水水,不难发现如下表
t 1 2 3 4
v 1 3 5 7
s 1 4 9 16
明显s=t*t
题目中对10000取模即取后四位,即对1000取余
#include<stdio.h> int main() { long long v,T,t,s; scanf("%lld",&T); while(T--) { scanf("%lld",&t); s=t*t; s=s%10000; printf("%lld\n",s); } return 0; }
标签:problem span printf long .com lan ret clu pre
原文地址:http://www.cnblogs.com/benTuTuT/p/6536377.html