55982023-08-02 13:23:55TomaSajtOszthatóság 17-tel (60 pont)cpp17Wrong answer 56/603ms4208 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  ll n;
  cin >> n;
  vector<ll> steps;

  while (true) {
    ll m = n / 10 - 5 * (n % 10);
    if (m >= 0) {
      steps.push_back(m);
      n = m;
    }
    if (m <= 0) break;
  }

  cout << (n % 17 == 0 ? "IGEN" : "NEM") << '\n';
  for (ll s : steps) cout << s << ' ';
}
SubtaskSumTestVerdictTimeMemory
base56/60
1Accepted0/03ms1684 KiB
2Accepted0/03ms1852 KiB
3Accepted3/32ms1932 KiB
4Accepted3/32ms2056 KiB
5Accepted4/42ms2276 KiB
6Accepted4/42ms2488 KiB
7Accepted4/43ms2724 KiB
8Accepted5/53ms2936 KiB
9Accepted5/53ms3176 KiB
10Accepted5/53ms3404 KiB
11Accepted5/52ms3416 KiB
12Accepted6/62ms3540 KiB
13Accepted6/62ms3796 KiB
14Accepted6/62ms3872 KiB
15Wrong answer0/23ms4120 KiB
16Wrong answer0/22ms4208 KiB