74582024-01-09 09:45:06TortelliniJrOszthatóság 31-gyelcsharpWrong answer 48/5028ms23768 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Oszth31Real
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int f = n;
            int l = f.ToString().Length;
            int g = 0;
            if (n % 31 == 0)
            {
                Console.WriteLine("IGEN");
                while (f != 0)
                {
                    g = f % 10;
                    f /= 10;
                    f -= 3 * g;
                    Console.Write(f + " ");
                }
            }
            else
            {
                Console.WriteLine("NEM");
                while (!(f <= 0))
                {
                    g = f % 10;
                    f /= 10;
                    f -= 3 * g;
                    if (!(f < 0))
                    {
                        Console.Write(f + " ");
                    }
                }
            }
            Console.ReadLine();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base48/50
1Accepted0/028ms20528 KiB
2Accepted0/027ms20768 KiB
3Accepted3/326ms21192 KiB
4Accepted3/327ms21296 KiB
5Accepted4/427ms21456 KiB
6Accepted4/426ms21988 KiB
7Accepted4/426ms22320 KiB
8Accepted4/426ms22160 KiB
9Accepted4/427ms22672 KiB
10Accepted4/427ms23116 KiB
11Accepted4/427ms23340 KiB
12Accepted4/427ms23464 KiB
13Accepted4/426ms23252 KiB
14Accepted4/426ms23188 KiB
15Accepted2/227ms23568 KiB
16Wrong answer0/227ms23768 KiB