結果
問題 | No.257 N言っちゃダメゲーム (3) |
ユーザー |
![]() |
提出日時 | 2018-03-16 21:20:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 57 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 413 ms |
コンパイル使用メモリ | 55,212 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 3.70 |
最終ジャッジ日時 | 2024-07-17 01:39:53 |
合計ジャッジ時間 | 3,539 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include<iostream> using namespace std; int main(){ int N,K,now,aite; cin >> N >> K; if(N%(K+1) == 1) now = 0; else if(N%(K+1) == 0) now = K; else now = N%(K+1)-1; cout << now << endl; while(1){ cin >> aite; if(aite >= N) break; now += K+1; cout << now << endl; } return 0; }