結果

問題 No.8 N言っちゃダメゲーム
コンテスト
ユーザー TLwiegehtt
提出日時 2015-07-06 23:33:10
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 5,000 ms
+ 735µs
コード長 340 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 45 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-23 23:13:45
合計ジャッジ時間 1,280 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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);
      |                 ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#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;
}
0