45732023-03-30 09:15:55TortelliniJrOszthatóság 17-tel (60 pont)csharpWrong answer 5/6027ms23232 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 - 2; i++)
                {
                    Console.Write(elemek[i] + " ");
                }
                Console.Write(elemek[elemek.Length - 1]);
            }
            else
            {
                Console.WriteLine("NEM");
                for (int i = 0; i < z - 2; i++)
                {
                    Console.Write(elemek[i] + " ");
                }
                Console.Write(elemek[elemek.Length - 1]);
            }
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base5/60
1Wrong answer0/027ms19960 KiB
2Wrong answer0/026ms20604 KiB
3Wrong answer0/326ms21104 KiB
4Wrong answer0/326ms21440 KiB
5Wrong answer0/426ms21284 KiB
6Wrong answer0/425ms21204 KiB
7Wrong answer0/425ms21520 KiB
8Wrong answer0/526ms22232 KiB
9Accepted5/526ms22460 KiB
10Wrong answer0/526ms23028 KiB
11Wrong answer0/526ms22824 KiB
12Wrong answer0/626ms23144 KiB
13Wrong answer0/626ms23164 KiB
14Wrong answer0/625ms23084 KiB
15Wrong answer0/225ms22804 KiB
16Wrong answer0/225ms23232 KiB