結果
| 問題 | No.257 N言っちゃダメゲーム (3) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-29 13:33:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 464 bytes |
| 記録 | |
| コンパイル時間 | 617 ms |
| コンパイル使用メモリ | 71,832 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 3.70 |
| 最終ジャッジ日時 | 2024-07-17 02:15:21 |
| 合計ジャッジ時間 | 4,108 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#define L64 long long
#define MOD (1000000007LL)
int main(void)
{
int n, k;
std::cin >> n >> k;
int stt = (n - 1) % (k + 1);
int ret = 0;
while(true){
std::cout << stt << std::endl << std::flush;
std::cin >> ret;
if(n <= ret){
break;
}
stt += (k + 1);
}
}