Cod sursa(job #2794338)
Utilizator | Data | 4 noiembrie 2021 17:57:15 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long s = 0;
int n;
cin >> n;
for (int i = 1; i <= n; ++i){
s += pow(i, i) % 10;
cout << s << '\n';
}
return 0;
}