34992023-02-28 13:24:36BenedekOszthatóság 31-gyelcsharpWrong answer 2/5028ms24180 KiB
using System;

class MainClass
{
    public static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());

        int lastDigit = n % 10;
        n /= 10;

        string intermediateNumbers = "";

        while (n > 0)
        {
            int firstDigit = n / (int)Math.Pow(10, (int)Math.Log10(n));
            int newNumber = n % (int)Math.Pow(10, (int)Math.Log10(n));
            int intermediateResult = firstDigit - 3 * lastDigit - newNumber;
            intermediateNumbers += intermediateResult + " ";
            n = newNumber;
            lastDigit = newNumber % 10;
        }

        if (n % 31 == 0)
        {
            Console.WriteLine("IGEN");
            Console.WriteLine(intermediateNumbers.Trim());
            Console.WriteLine("0");
        }
        else
        {
            Console.WriteLine("NEM");
        }
        Console.ReadKey();
    }
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Wrong answer0/028ms20624 KiB
2Wrong answer0/027ms21232 KiB
3Wrong answer0/327ms21744 KiB
4Wrong answer0/326ms22144 KiB
5Wrong answer0/427ms22140 KiB
6Wrong answer0/426ms21780 KiB
7Wrong answer0/426ms22560 KiB
8Wrong answer0/426ms22852 KiB
9Wrong answer0/426ms22600 KiB
10Wrong answer0/426ms22844 KiB
11Wrong answer0/427ms23028 KiB
12Wrong answer0/426ms23408 KiB
13Wrong answer0/426ms23580 KiB
14Wrong answer0/426ms23940 KiB
15Accepted2/225ms23808 KiB
16Wrong answer0/226ms24180 KiB