結果
| 問題 |
No.257 N言っちゃダメゲーム (3)
|
| コンテスト | |
| ユーザー |
kohaku_kohaku
|
| 提出日時 | 2016-12-04 05:28:33 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 569 bytes |
| コンパイル時間 | 1,823 ms |
| コンパイル使用メモリ | 74,168 KB |
| 実行使用メモリ | 72,676 KB |
| 平均クエリ数 | 3.07 |
| 最終ジャッジ日時 | 2024-07-16 11:26:25 |
| 合計ジャッジ時間 | 8,602 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 26 |
ソースコード
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)-1;
if(t==-1){
t=K;
}
System.out.println(t);
System.out.flush();
int B = sc.nextInt();
int d=B-t;
while(B<N){
int A=B+(K+1-d);
System.out.println(A);
System.out.flush();
t=B;
B=sc.nextInt();
d=B-t;
}
}
}
kohaku_kohaku