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

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

  while (true) {
    int 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 (int s : steps) cout << s << ' ';
}
SubtaskSumTestVerdictTimeMemory
base56/60
1Accepted0/03ms1808 KiB
2Accepted0/03ms1856 KiB
3Accepted3/33ms2064 KiB
4Accepted3/32ms2156 KiB
5Accepted4/43ms2288 KiB
6Accepted4/43ms2508 KiB
7Accepted4/42ms2588 KiB
8Accepted5/52ms2600 KiB
9Accepted5/52ms2708 KiB
10Accepted5/53ms2964 KiB
11Accepted5/53ms3076 KiB
12Accepted6/62ms3164 KiB
13Accepted6/63ms3168 KiB
14Accepted6/63ms3388 KiB
15Wrong answer0/22ms3476 KiB
16Wrong answer0/22ms3480 KiB