34892023-02-28 12:37:59BenedekOszthatóság 31-gyelcsharpWrong answer 25/5028ms23020 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _31
{
    class Program
    {
        static void Main(string[] args)
        {
            int alap = int.Parse(Console.ReadLine());
            int b = 0;
            List<int> g = new List<int>();

            while (alap > 18)
            {
                b = alap % 10;
                alap = alap / 10 -  b * 3;
                g.Add(alap);
            }
            if (alap == 0)
            {
                
                if (g.Count != 1)
                {
                    Console.WriteLine("IGEN");
                    foreach (var item in g)
                    {
                        
                        Console.Write(item + " ");
                    }
                }
                else
                {
                    Console.WriteLine("IGEN");
                    Console.WriteLine("0");
                }
                
            }
            else
            {
                if (g.Count != 1)
                {
                    Console.WriteLine("NEM");
                    foreach (var item in g)
                    {
                        Console.Write(item + " ");

                    }
                }
                else
                {
                    Console.WriteLine("NEM");
                }
                

            }

            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base25/50
1Accepted0/028ms20176 KiB
2Accepted0/028ms20456 KiB
3Wrong answer0/328ms20800 KiB
4Accepted3/328ms21020 KiB
5Accepted4/428ms21456 KiB
6Wrong answer0/428ms21504 KiB
7Wrong answer0/428ms21548 KiB
8Accepted4/428ms21896 KiB
9Accepted4/428ms22048 KiB
10Wrong answer0/428ms22148 KiB
11Accepted4/428ms22820 KiB
12Wrong answer0/428ms22380 KiB
13Wrong answer0/428ms22440 KiB
14Accepted4/428ms22720 KiB
15Accepted2/227ms23020 KiB
16Wrong answer0/227ms22724 KiB