結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー |
![]() |
提出日時 | 2015-07-06 23:33:10 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 01:23:35 |
合計ジャッジ時間 | 749 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d", &P); | ^~~~~~~~~~~~~~~ main.c:11:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d %d", &N, &K); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ int i; int P; int WinLose[102]; scanf("%d", &P); for(i=0;i<P;i++){ int N, K; scanf("%d %d", &N, &K); WinLose[i] = 1; if((N-1)%(K+1) == 0 ){ WinLose[i] = 0; } } for(i=0;i<P;i++){ if(WinLose[i] == 1 ){ printf("Win\n"); }else{ printf("Lose\n"); } } return 0; }