45722023-03-30 09:10:03TortelliniJrOszthatóság 17-tel (60 pont)csharpRuntime error 51/6043ms30196 KiB
using System;

namespace Oszth17
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            int[] elemek = new int[1000000];
            int z = 0;
            int f;
            while (a > -1)
            {
                f = a % 10;
                a = (int)(a / 10);
                a -= f * 5;
                elemek[z] = a;
                z++;
            }
            if (a % 17 == 0)
            {
                Console.WriteLine("IGEN");
                for (int i = 0; i < z - 1; i++)
                {
                    Console.Write(elemek[i] + " ");
                }
            }
            else
            {
                Console.WriteLine("NEM");
                for (int i = 0; i < z - 1; i++)
                {
                    Console.Write(elemek[i] + " ");
                }
            }
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base51/60
1Accepted0/026ms20112 KiB
2Accepted0/026ms20628 KiB
3Accepted3/326ms20924 KiB
4Accepted3/326ms21248 KiB
5Accepted4/426ms21888 KiB
6Accepted4/426ms21976 KiB
7Accepted4/426ms22092 KiB
8Accepted5/526ms22484 KiB
9Runtime error0/543ms30196 KiB
10Accepted5/526ms22784 KiB
11Accepted5/526ms22860 KiB
12Accepted6/626ms23008 KiB
13Accepted6/625ms23280 KiB
14Accepted6/626ms23736 KiB
15Wrong answer0/225ms24024 KiB
16Wrong answer0/225ms23628 KiB