結果
| 問題 | No.8 N言っちゃダメゲーム |
| コンテスト | |
| ユーザー |
TLwiegehtt
|
| 提出日時 | 2015-07-06 23:33:10 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 29,128 KB |
| 最終ジャッジ日時 | 2026-02-23 18:38:54 |
|
ジャッジサーバーID (参考情報) |
judge2 / 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;
}
TLwiegehtt