結果
問題 |
No.257 N言っちゃダメゲーム (3)
|
ユーザー |
![]() |
提出日時 | 2019-06-24 23:51:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 386 bytes |
コンパイル時間 | 1,505 ms |
コンパイル使用メモリ | 166,364 KB |
実行使用メモリ | 43,936 KB |
最終ジャッジ日時 | 2024-07-16 17:14:04 |
合計ジャッジ時間 | 7,904 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, K; cin >> N >> K; ll t = (N - 1) % (K + 1); if (t == 0) { cout << 0 << "\n"; } else { cout << t << "\n"; } while (t < N) { ll a; cin >> a; a %= K; a = K - a; cout << t + a << "\n"; cin >> t; } return 0; }