結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー kohaku_kohaku
提出日時 2016-12-04 05:00:39
言語 Java
(openjdk 23)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 466 bytes
コンパイル時間 1,797 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 72,408 KB
平均クエリ数 1.87
最終ジャッジ日時 2024-07-16 11:25:58
合計ジャッジ時間 8,520 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int t = N%(K+1);
        System.out.println(t-1);
        System.out.flush();
        int B = sc.nextInt();
        while(B<N){
            int A=K+1-B;
            System.out.println(A);
            System.out.flush();
            B = sc.nextInt();
        }
    }
}
0