結果

問題 No.249 N言っちゃダメゲーム (2)
ユーザー NoNo
提出日時 2018-01-28 04:49:57
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 542 bytes
コンパイル時間 1,884 ms
コンパイル使用メモリ 102,760 KB
実行使用メモリ 22,508 KB
最終ジャッジ日時 2023-08-28 10:36:57
合計ジャッジ時間 2,922 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 1000; i++)
            {
                int cnt = 0;
                var ss = Console.ReadLine().Split();
                if (N(int.Parse(ss[0]), int.Parse(ss[1]))) cnt++;
                Console.WriteLine(cnt);
            }
        }

        static bool N(int n,int k)
        {
            int f = (n - 1) % (k + 1);
            if (f == 0) return true;
            else return false;
        }
    }
}
0