結果
| 問題 |
No.8 N言っちゃダメゲーム
|
| コンテスト | |
| ユーザー |
y_mazun
|
| 提出日時 | 2015-04-17 02:50:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 348 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 33,792 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-04 15:21:55 |
| 合計ジャッジ時間 | 713 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int getInt()’:
main.cpp:4:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | inline int getInt(){ int s; scanf("%d", &s); return s; }
| ~~~~~^~~~~~~~~~
ソースコード
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }
#include <set>
using namespace std;
int main(){
const int p = getInt();
REP(_,p){
const int n = getInt();
const int k = getInt();
puts(n > k && (n - 1) % (k + 1) == 0 ? "Lose" : "Win");
}
return 0;
}
y_mazun