結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー itezpaceitezpace
提出日時 2016-05-30 18:05:09
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 50,648 KB
実行使用メモリ 24,276 KB
平均クエリ数 8.60
最終ジャッジ日時 2023-09-24 00:00:57
合計ジャッジ時間 3,619 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
23,340 KB
testcase_01 AC 44 ms
23,940 KB
testcase_02 AC 45 ms
24,036 KB
testcase_03 AC 45 ms
23,580 KB
testcase_04 AC 45 ms
24,228 KB
testcase_05 AC 43 ms
23,916 KB
testcase_06 AC 44 ms
23,640 KB
testcase_07 AC 44 ms
23,340 KB
testcase_08 AC 43 ms
23,844 KB
testcase_09 AC 45 ms
23,436 KB
testcase_10 AC 48 ms
23,508 KB
testcase_11 AC 43 ms
23,436 KB
testcase_12 AC 44 ms
24,132 KB
testcase_13 AC 44 ms
24,036 KB
testcase_14 AC 43 ms
24,276 KB
testcase_15 AC 43 ms
23,400 KB
testcase_16 AC 43 ms
23,352 KB
testcase_17 AC 44 ms
24,012 KB
testcase_18 AC 44 ms
23,628 KB
testcase_19 AC 44 ms
24,240 KB
testcase_20 AC 45 ms
23,844 KB
testcase_21 AC 44 ms
23,976 KB
testcase_22 AC 44 ms
24,240 KB
testcase_23 AC 43 ms
24,072 KB
testcase_24 AC 44 ms
23,916 KB
testcase_25 AC 44 ms
24,132 KB
testcase_26 AC 44 ms
23,640 KB
testcase_27 AC 43 ms
23,640 KB
testcase_28 AC 43 ms
23,400 KB
testcase_29 AC 44 ms
23,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;

int main(){
  ll n,k; cin>>n>>k;
  ll a=(n-1)%(k+1);

  while(1){
    if(a>=n) break;
    cout<<a<<endl;
    cout<<flush;
    ll b;
    cin>>b;
    a+=k+1;
  }

  return 0;
}
0