結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー mamekin
提出日時 2016-02-15 20:51:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 679 bytes
コンパイル時間 612 ms
コンパイル使用メモリ 92,580 KB
実行使用メモリ 43,428 KB
最終ジャッジ日時 2024-07-16 22:56:22
合計ジャッジ時間 7,047 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 = n;
    for(;;){
        int a = (x - 1) % (k + 1);
        cout << a << endl;

        int b;
        cin >> b;
        if(b > n)
            break;
        x = n - b;
    }

    return 0;
}
0