We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
long long int x;
scanf("%lld",&x);
long long int r =((x % 1000000007)*(x % 1000000007)) % 1000000007;
printf("%lld\n",r);
}
return 0;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Summing the N series
You are viewing a single comment's thread. Return to all comments →
include
int main() { int t; scanf("%d",&t); while(t--) { long long int x; scanf("%lld",&x); long long int r =((x % 1000000007)*(x % 1000000007)) % 1000000007; printf("%lld\n",r); } return 0; }