結果
問題 |
No.257 N言っちゃダメゲーム (3)
|
ユーザー |
![]() |
提出日時 | 2019-09-05 15:37:44 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 25,832 KB |
平均クエリ数 | 8.00 |
最終ジャッジ日時 | 2024-07-16 18:07:22 |
合計ジャッジ時間 | 4,294 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 21 |
ソースコード
// yukicoder: 257 N言っちゃダメゲーム (3) // 2019.9.5 bal4u #include <stdio.h> #include <stdlib.h> int N; void out(int x) { printf("%d\n", x), fflush(stdout); } void in() { int you; scanf("%d", &you); if (you >= N) exit(0); } int main() { int p, K, first; scanf("%d%d", &N, &K); if ((N-1)%(K+1) == 0) out(0), first = 0, p = 0; else out(1), first = 1, p = 1; while (1) in(), p += K+1, out(p); return 0; }