結果

問題 No.1229 ラグビーの得点パターン
ユーザー bluemeganebluemegane
提出日時 2020-09-18 22:35:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 437 bytes
コンパイル時間 2,278 ms
コンパイル使用メモリ 62,964 KB
実行使用メモリ 22,724 KB
最終ジャッジ日時 2023-09-04 11:12:38
合計ジャッジ時間 4,891 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,616 KB
testcase_01 AC 57 ms
20,720 KB
testcase_02 AC 56 ms
22,644 KB
testcase_03 AC 56 ms
20,548 KB
testcase_04 AC 56 ms
18,508 KB
testcase_05 AC 56 ms
20,596 KB
testcase_06 AC 57 ms
20,588 KB
testcase_07 AC 56 ms
20,732 KB
testcase_08 AC 56 ms
18,732 KB
testcase_09 AC 56 ms
20,668 KB
testcase_10 AC 56 ms
20,688 KB
testcase_11 AC 56 ms
18,692 KB
testcase_12 AC 57 ms
20,728 KB
testcase_13 AC 56 ms
22,712 KB
testcase_14 AC 58 ms
20,744 KB
testcase_15 AC 59 ms
22,644 KB
testcase_16 AC 57 ms
20,736 KB
testcase_17 AC 57 ms
22,724 KB
testcase_18 AC 57 ms
20,680 KB
testcase_19 AC 58 ms
20,612 KB
testcase_20 AC 57 ms
20,636 KB
testcase_21 AC 57 ms
18,704 KB
testcase_22 AC 57 ms
20,556 KB
testcase_23 AC 57 ms
20,688 KB
testcase_24 AC 56 ms
20,632 KB
testcase_25 AC 56 ms
20,696 KB
testcase_26 AC 56 ms
20,700 KB
testcase_27 AC 56 ms
20,816 KB
testcase_28 AC 56 ms
18,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(int n)
    {
        var count = 0;
        for (int i = 0; i <= n / 5; i++)
            for (int j = 0; j <= i; j++)
                for (int k = 0; k <= n / 3; k++)
                    if (5 * i + 2 * j + 3 * k == n) count++;
        Console.WriteLine(count);
    }
}
0