結果

問題 No.1229 ラグビーの得点パターン
ユーザー semisagisemisagi
提出日時 2020-09-18 21:22:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,163 bytes
コンパイル時間 4,498 ms
コンパイル使用メモリ 103,184 KB
実行使用メモリ 22,856 KB
最終ジャッジ日時 2023-09-04 09:21:49
合計ジャッジ時間 6,026 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
22,688 KB
testcase_01 AC 61 ms
22,716 KB
testcase_02 AC 61 ms
20,672 KB
testcase_03 AC 61 ms
20,668 KB
testcase_04 AC 60 ms
22,684 KB
testcase_05 AC 59 ms
20,764 KB
testcase_06 AC 60 ms
22,768 KB
testcase_07 AC 58 ms
20,688 KB
testcase_08 AC 59 ms
20,616 KB
testcase_09 AC 59 ms
20,736 KB
testcase_10 AC 61 ms
22,692 KB
testcase_11 AC 59 ms
20,728 KB
testcase_12 AC 59 ms
20,752 KB
testcase_13 AC 59 ms
20,680 KB
testcase_14 AC 61 ms
22,812 KB
testcase_15 AC 60 ms
20,732 KB
testcase_16 AC 60 ms
20,732 KB
testcase_17 AC 60 ms
22,728 KB
testcase_18 AC 59 ms
22,780 KB
testcase_19 AC 60 ms
22,728 KB
testcase_20 AC 59 ms
20,684 KB
testcase_21 AC 59 ms
22,856 KB
testcase_22 AC 60 ms
20,756 KB
testcase_23 AC 60 ms
20,592 KB
testcase_24 AC 59 ms
22,804 KB
testcase_25 AC 59 ms
20,776 KB
testcase_26 AC 59 ms
22,808 KB
testcase_27 AC 59 ms
20,592 KB
testcase_28 AC 59 ms
22,668 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;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3 {
    class Program {
        static void Main(string[] args) {
            var scanner = new Scanner();
            int N = scanner.NextInt();

            int answer = 0;
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        if (j <= i && i * 5 + j * 2 + k * 3 == N) {
                            answer++;
                        }
                    }
                }
            }
            Console.WriteLine(answer);
        }
    }

    class Scanner {
        int index = 0;
        string[] tokens = { };

        public string Next() {
            if (index == tokens.Length) {
                index = 0;
                tokens = Console.ReadLine().Split(' ');
            }
            return tokens[index++];
        }

        public int NextInt() {
            return int.Parse(Next());
        }

        public long NextLong() {
            return long.Parse(Next());
        }
    }
}
0