結果
| 問題 | No.257 N言っちゃダメゲーム (3) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-23 09:15:12 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 265 bytes |
| 記録 | |
| コンパイル時間 | 632 ms |
| コンパイル使用メモリ | 79,232 KB |
| 実行使用メモリ | 29,776 KB |
| 平均クエリ数 | 3.70 |
| 最終ジャッジ日時 | 2026-06-27 17:09:23 |
| 合計ジャッジ時間 | 4,948 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int n,k;cin>>n>>k;
cout << (n-1)%(k+1) << endl;
int nw = 1;
int rem = (n-1)%(k+1);
while(true){
int x;cin>>x;
if(x >= n){
return 0;
}
cout << nw*(k+1)+rem << endl;
nw++;
}
}