結果
問題 |
No.8 N言っちゃダメゲーム
|
ユーザー |
![]() |
提出日時 | 2015-11-06 21:59:20 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 13:14:23 |
合計ジャッジ時間 | 651 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | 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 p,i; int n[100],k[100]; scanf("%d",&p); for(i=0;i<p;i++){ scanf("%d%d",&n[i],&k[i]); } for(i=0;i<p;i++){ if((n[i]-1)%(k[i]+1) == 0) printf("Lose\n"); else printf("win\n"); } return 0; }