結果

問題 No.257 N言っちゃダメゲーム (3)
コンテスト
ユーザー koba-e964
提出日時 2015-08-18 16:23:14
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 52 ms / 2,000 ms
+ 0µs
コード長 344 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 248 ms
コンパイル使用メモリ 70,832 KB
実行使用メモリ 6,016 KB
平均クエリ数 3.70
最終ジャッジ日時 2026-08-14 15:51:46
合計ジャッジ時間 2,710 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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