結果

問題 No.8 N言っちゃダメゲーム
ユーザー yuppe19 😺
提出日時 2020-01-18 10:44:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 235 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 27,264 KB
最終ジャッジ日時 2025-01-08 19:56:57
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |   int P; scanf("%d", &P);
      |          ~~~~~^~~~~~~~~~
main.cpp:7:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     int N, K; scanf("%d%d", &N, &K);
      |               ~~~~~^~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
using namespace std;

int main(void) {
  int P; scanf("%d", &P);
  for(int loop=0; loop<P; ++loop) {
    int N, K; scanf("%d%d", &N, &K);
    bool ok = N % (K+1) != 1;
    puts(ok ? "Win" : "Lose");
  }
  return 0;
}
0