81282024-01-12 14:09:57czbendeOszthatóság 17-tel (60 pont)csharpAccepted 60/6028ms23232 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _17
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int n2 = n / 10 - (n % 10) * 5;
            int[] a = new int[100];
            int i = 0;
            if (n2 >= 0)
            {
                a[0] = n2;
                i++;
            }
                
           
            while (n2 > 0)
            {
                
                n2 = n2 / 10 - (n2 % 10) * 5;
                if (n2 >= 0)
                {
                    
                    a[i] = n2;
                    i++;
                }
            }
            if (n2 % 17 == 0)
            {
                Console.WriteLine("IGEN");

            }
            else
            {
                Console.WriteLine("NEM");
            }
            for (int j = 0; j < i; j++)
            {
                Console.Write(a[j] + " ");

            }
            Console.WriteLine();
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/026ms20188 KiB
2Accepted0/025ms20812 KiB
3Accepted3/325ms21052 KiB
4Accepted3/325ms21216 KiB
5Accepted4/427ms21316 KiB
6Accepted4/426ms22220 KiB
7Accepted4/425ms22464 KiB
8Accepted5/526ms22356 KiB
9Accepted5/528ms22940 KiB
10Accepted5/526ms22988 KiB
11Accepted5/526ms23232 KiB
12Accepted6/626ms23060 KiB
13Accepted6/626ms23020 KiB
14Accepted6/626ms22860 KiB
15Accepted2/226ms22836 KiB
16Accepted2/226ms23076 KiB