9782022-02-09 19:38:53Kevinke12Oszthatóság 17-tel (60 pont)cpp14Wrong answer 56/602ms1904 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() 
{
    long long n;
    cin >> n;
    vector<ll> a;
    int x;
    while (n>0) {
        //Utolsó szjegy
        x=n%10;
        //Uj n-et (n/10)
        n=n/10;
        n=n-x*5;

        //pb
        a.push_back(n);
    }
    if (a.size()>=1 && a[a.size()-1]<0)   
        a.pop_back(); // A végét leveszi
    
    if (a[a.size()-1]%17==0) {
        cout << "IGEN";
    }
    else {
        cout << "NEM";
    }
    cout << endl ;
    for(ll aktE:a)
    {
        cout << aktE << " ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base56/60
1Accepted0/02ms1740 KiB
2Accepted0/01ms1784 KiB
3Accepted3/31ms1852 KiB
4Accepted3/31ms1856 KiB
5Accepted4/41ms1860 KiB
6Accepted4/41ms1860 KiB
7Accepted4/41ms1868 KiB
8Accepted5/51ms1872 KiB
9Accepted5/51ms1872 KiB
10Accepted5/51ms1880 KiB
11Accepted5/51ms1880 KiB
12Accepted6/61ms1888 KiB
13Accepted6/61ms1888 KiB
14Accepted6/61ms1896 KiB
15Wrong answer0/21ms1900 KiB
16Wrong answer0/21ms1904 KiB