結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー |
![]() |
提出日時 | 2018-11-01 01:49:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 1,654 ms |
コンパイル使用メモリ | 168,036 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-19 13:58:02 |
合計ジャッジ時間 | 2,248 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { int P; cin >> P; vector<int> N(P), K(P); for(int i=0; i<P; i++) cin >> N[i] >> K[i]; for (int i = 0; i < P; i++) { int n = N[i] - 1; while (1) { //cout << n << endl; n -= (K[i] + 1); if (n <= 0) { //cout << n << endl; break; } } if (n < 0) cout << "Win" << endl; else cout << "Lose" << endl; } }