結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー kano_town
提出日時 2015-07-31 22:44:16
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 454 bytes
コンパイル時間 3,668 ms
コンパイル使用メモリ 74,732 KB
実行使用メモリ 73,000 KB
平均クエリ数 4.70
最終ジャッジ日時 2024-07-16 05:18:22
合計ジャッジ時間 10,809 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder257 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt(), now;
        int r = (n - 1) % (k + 1), o;
        now = r;
        System.out.println(now);
        while (true) {
            o = sc.nextInt();
            if (o > n) return;
            now += (k + 1);
            System.out.println(now);
        }
    }
}
0