34972023-02-28 13:16:38BenedekOszthatóság 31-gyelcsharpAccepted 50/5028ms23640 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/027ms19956 KiB
2Accepted0/026ms20300 KiB
3Accepted3/328ms20916 KiB
4Accepted3/327ms21456 KiB
5Accepted4/428ms21528 KiB
6Accepted4/427ms21896 KiB
7Accepted4/427ms22360 KiB
8Accepted4/428ms22136 KiB
9Accepted4/427ms22436 KiB
10Accepted4/427ms22584 KiB
11Accepted4/427ms22820 KiB
12Accepted4/428ms23296 KiB
13Accepted4/428ms23264 KiB
14Accepted4/428ms23168 KiB
15Accepted2/227ms23396 KiB
16Accepted2/227ms23640 KiB