34982023-02-28 13:24:16BenedekOszthatóság 31-gyelcsharpAccepted 50/5028ms23404 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;

namespace _31
{
    class Program
    {
        static void Main(string[] args)
        {


            int alap = int.Parse(Console.ReadLine());
            if (alap % 31 == 0)
            {
                Console.WriteLine("IGEN");
            }
            else
            {
                Console.WriteLine("NEM");
            }
            int b = 0;
            List<int> g = new List<int>();

            while (alap > 0)
            {
                b = alap % 10;
                alap = alap / 10 -  b * 3;
                if(alap < 0)
                {
                    break;
                }
                g.Add(alap);
            }
            if (g.Count > 0)
            {
                foreach (var item in g)
                {
                    Console.Write(item + " ");
                }
            }
            else
            {
                Console.WriteLine();
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/028ms20100 KiB
2Accepted0/028ms20436 KiB
3Accepted3/327ms20908 KiB
4Accepted3/328ms21244 KiB
5Accepted4/427ms21192 KiB
6Accepted4/428ms21980 KiB
7Accepted4/427ms21968 KiB
8Accepted4/427ms22056 KiB
9Accepted4/427ms22056 KiB
10Accepted4/428ms22140 KiB
11Accepted4/427ms22184 KiB
12Accepted4/428ms22716 KiB
13Accepted4/428ms22568 KiB
14Accepted4/427ms23060 KiB
15Accepted2/226ms23404 KiB
16Accepted2/227ms23168 KiB