結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー koba-e964
提出日時 2015-08-18 16:23:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 54,636 KB
実行使用メモリ 25,604 KB
平均クエリ数 3.70
最終ジャッジ日時 2024-07-16 21:10:35
合計ジャッジ時間 3,842 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;



int main(void){
  int n, k;
  cin >> n >> k;
  int c = (n - 1) % (k + 1);
  cout << c << endl;
  while (1) {
    int d;
    cin >> d;
    if (d >= n) {
      return 0;
    }
    c += k + 1;
    cout << c << endl;
  }
}
0