結果

問題 No.661 ハローキティはりんご3個分
ユーザー kmtrc130kmtrc130
提出日時 2019-03-15 14:07:05
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 879 bytes
コンパイル時間 4,443 ms
コンパイル使用メモリ 103,936 KB
実行使用メモリ 22,844 KB
最終ジャッジ日時 2023-09-14 12:14:19
合計ジャッジ時間 3,559 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,752 KB
testcase_01 AC 55 ms
22,844 KB
testcase_02 AC 57 ms
22,724 KB
testcase_03 AC 56 ms
20,688 KB
testcase_04 AC 57 ms
22,800 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    public void Solve()
    {
        int i = int.Parse(Console.ReadLine());
        List<int> N = new List<int>();
        for (int idx = 0; idx < i; idx++)
        {
            N.Add(int.Parse(Console.ReadLine()));
        }

        foreach (var n in N)
        {
            if (n % 8 == 0 && n % 10 == 0)
            {
                Console.WriteLine("ikisugi");
            }
            else if (n % 8 == 0)
            {
                Console.WriteLine("iki");
            }
            else if (n % 10 == 0)
            {
                Console.WriteLine("sugi");
            }
            else
            {
                Console.WriteLine(n / 3);
            }
        }

    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0