fork download
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main() {
  7. long long int r, n, t;
  8. const int md=1e9+7;
  9. scanf("%lld", &t);
  10. while(t--) {
  11. scanf("%lld", &n);
  12. n%=md;
  13. r=(n*n)%md;
  14. printf("%lld\n", r);
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 3300KB
stdin
10
229137999
344936985
681519110
494844394
767088309
307062702
306074554
555026606
4762607
231677104
stdout
218194447
788019571
43914042
559130432
685508198
299528290
950527499
211497519
425277675
142106856