結果
| 問題 |
No.257 N言っちゃダメゲーム (3)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-15 21:47:52 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 646 bytes |
| コンパイル時間 | 891 ms |
| コンパイル使用メモリ | 91,396 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 3.70 |
| 最終ジャッジ日時 | 2024-07-16 22:56:32 |
| 合計ジャッジ時間 | 4,598 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
int x = 0;
for(;;){
x += (n - x - 1) % (k + 1);
cout << x << endl;
cin >> x;
if(x >= n)
break;
}
return 0;
}