77972024-01-11 10:25:16tamasmarkOszthatóság 31-gyelcpp17Futási hiba 25/5064ms64936 KiB
// oszthatosag 31-el.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <vector>

using namespace std;

vector<unsigned long long>x;
unsigned long long n, i, akt;

int main()
{
    cin >> n;
    while (n > 0)
    {
        akt = 3 * (n % 10);
        n = (n / 10) - akt;
        x.push_back(n);
    }
    if (n == 0)
    {
        cout << "IGEN" << "\n";
        for (i = 0; i < x.size(); ++i)
        {
            cout << x[i] << " ";
        }
    }
    else
    {
        cout << "NEM" << "\n";
        for (i = 0; i < x.size() - 1; ++i)
        {
            cout << x[i] << " ";
        }
    }
    return 0;
}
//204197
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
RészfeladatÖsszpontTesztVerdiktIdőMemória
base25/50
1Elfogadva0/03ms1900 KiB
2Futási hiba0/064ms64936 KiB
3Futási hiba0/364ms64696 KiB
4Elfogadva3/33ms2508 KiB
5Elfogadva4/43ms2736 KiB
6Futási hiba0/464ms64328 KiB
7Futási hiba0/464ms64092 KiB
8Elfogadva4/43ms3120 KiB
9Elfogadva4/43ms3208 KiB
10Futási hiba0/463ms63644 KiB
11Elfogadva4/43ms3432 KiB
12Futási hiba0/464ms63636 KiB
13Futási hiba0/464ms63608 KiB
14Elfogadva4/43ms3476 KiB
15Elfogadva2/23ms3472 KiB
16Futási hiba0/254ms63384 KiB