結果

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

ソースコード

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) {
    cin >> c;
    if (c >= n) {
      return 0;
    }
    cout << (c + k) / (k + 1) * (k + 1) << endl;
  }
}
0