125132024-12-21 10:30:39CsongiOszthatóság 31-gyelcpp17Wrong answer 28/501ms500 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    ll n,k; cin >> n;k=n;
    int l;
    vector<ll> v;
    while (n > 30)
    {
        l = (n % 10)*3;
        n /= 10;
        n = n - l;
        v.push_back(n);
    }
    n % 31 == 0 ? cout << "IGEN"<<endl : cout << "NEM"<<endl;
    for (ll i : v)
        i < 0 && v.size() == 1 ? cout << endl : cout << i << " ";
    

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base28/50
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms320 KiB
5Accepted4/41ms320 KiB
6Wrong answer0/41ms320 KiB
7Wrong answer0/41ms320 KiB
8Accepted4/41ms320 KiB
9Accepted4/41ms320 KiB
10Wrong answer0/41ms320 KiB
11Accepted4/41ms320 KiB
12Wrong answer0/41ms320 KiB
13Wrong answer0/41ms320 KiB
14Accepted4/41ms320 KiB
15Accepted2/21ms320 KiB
16Wrong answer0/21ms320 KiB