81222024-01-12 14:06:24czbendeOszthatóság 17-tel (60 pont)csharpRuntime error 55/6028ms23012 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
base55/60
1Accepted0/027ms20460 KiB
2Accepted0/026ms20752 KiB
3Accepted3/327ms20856 KiB
4Accepted3/326ms21256 KiB
5Accepted4/426ms21696 KiB
6Accepted4/426ms22188 KiB
7Accepted4/426ms22000 KiB
8Accepted5/526ms22536 KiB
9Runtime error0/528ms21752 KiB
10Accepted5/526ms22040 KiB
11Accepted5/527ms22668 KiB
12Accepted6/627ms22740 KiB
13Accepted6/626ms22964 KiB
14Accepted6/627ms22968 KiB
15Accepted2/227ms23012 KiB
16Accepted2/227ms22912 KiB