C++ :
#include<stdio.h> int main() { long long t,n; scanf("%lld",&t); while(t--) { scanf("%lld",&n); printf("%lld\n",n*n%10000); } return 0; }
By signing up a 算道OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 算道OJ universal account