Cod sursa(job #2342830)
Utilizator | Data | 13 februarie 2019 13:19:03 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include<fstream>
#include<math.h>
using namespace std;
ifstream finnaWoke("cifra.in");
ofstream finnaSleep("cifra.out");
int main()
{
int t,i;
long long n,j,s;
finnaWoke>>t;
for(i=1;i<=t;i++)
{
finnaWoke>>n;
s=0;
for(j=1;j<=n;j++)
s=s+(pow((j%10),(j%4)))%10;
s=s%10;
finnaSleep<<s<<endl;
}
return 0;
}