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