結果
問題 |
No.257 N言っちゃダメゲーム (3)
|
ユーザー |
|
提出日時 | 2015-07-31 22:49:27 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 180 ms / 2,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 3,261 ms |
コンパイル使用メモリ | 74,136 KB |
実行使用メモリ | 70,792 KB |
平均クエリ数 | 3.70 |
最終ジャッジ日時 | 2024-07-16 20:55:45 |
合計ジャッジ時間 | 10,315 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
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); System.out.flush(); while (true) { o = sc.nextInt(); if (o >= n) break; now += (k + 1); System.out.println(now); System.out.flush(); } } }