Răspuns:
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
const int mod = 7;
int v[40000];
int main()
{
unsigned long long n , rezult = 0, pow = 1, nrs;
cin >> nrs;
for(int i = 1; i <= nrs; i++)
{
cin >> n;
cout << n % 7 << endl;
}
return 0;
}
Explicație: