結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー NoNo
提出日時 2017-05-27 01:23:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 711 bytes
コンパイル時間 2,693 ms
コンパイル使用メモリ 101,968 KB
実行使用メモリ 39,128 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 01:17:58
合計ジャッジ時間 6,630 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
36,564 KB
testcase_01 AC 92 ms
36,504 KB
testcase_02 AC 95 ms
36,600 KB
testcase_03 AC 92 ms
37,028 KB
testcase_04 AC 90 ms
38,372 KB
testcase_05 AC 92 ms
38,464 KB
testcase_06 AC 95 ms
36,736 KB
testcase_07 AC 93 ms
38,584 KB
testcase_08 AC 96 ms
36,836 KB
testcase_09 AC 98 ms
38,828 KB
testcase_10 AC 100 ms
38,544 KB
testcase_11 AC 94 ms
36,864 KB
testcase_12 AC 98 ms
38,420 KB
testcase_13 AC 97 ms
39,128 KB
testcase_14 AC 97 ms
36,340 KB
testcase_15 AC 96 ms
36,972 KB
testcase_16 AC 95 ms
36,436 KB
testcase_17 AC 93 ms
38,744 KB
testcase_18 AC 96 ms
36,600 KB
testcase_19 AC 92 ms
36,780 KB
testcase_20 AC 95 ms
36,384 KB
testcase_21 AC 90 ms
36,288 KB
testcase_22 AC 96 ms
37,144 KB
testcase_23 AC 98 ms
36,364 KB
testcase_24 AC 95 ms
36,552 KB
testcase_25 AC 96 ms
36,648 KB
testcase_26 AC 98 ms
36,976 KB
testcase_27 AC 98 ms
36,832 KB
testcase_28 AC 96 ms
37,000 KB
testcase_29 AC 94 ms
36,860 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
namespace Yuki
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] ss = Console.ReadLine().Split();
            int n = int.Parse(ss[0]);
            int k = int.Parse(ss[1]);

            int f = (n - 1) % (k + 1);
            if (f == 0)
            {
                Console.WriteLine("0");
                f += k + 1;
            }
            else
            {
                Console.WriteLine(f);
                f += k + 1;
            }

            while (true)
            {
                if (int.Parse(Console.ReadLine()) >= n) break;
                else Console.WriteLine(f);
                f += k + 1;
            }
        }
    }
}
0