45742023-03-30 09:16:30TortelliniJrOszthatóság 17-tel (60 pont)csharpWrong answer 56/6026ms23128 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;
                if (a == 0)
                {
                    elemek[z] = a;
                    z+= 2;
                    break;
                }
                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
base56/60
1Accepted0/025ms20160 KiB
2Accepted0/025ms20248 KiB
3Accepted3/326ms20936 KiB
4Accepted3/325ms20944 KiB
5Accepted4/425ms20908 KiB
6Accepted4/425ms21316 KiB
7Accepted4/425ms21120 KiB
8Accepted5/525ms21116 KiB
9Accepted5/525ms21588 KiB
10Accepted5/525ms21916 KiB
11Accepted5/526ms22272 KiB
12Accepted6/625ms22392 KiB
13Accepted6/626ms22244 KiB
14Accepted6/626ms23128 KiB
15Wrong answer0/225ms23040 KiB
16Wrong answer0/225ms22888 KiB