結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー | akakimidori |
提出日時 | 2016-02-19 14:47:05 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 224 bytes |
コンパイル時間 | 135 ms |
コンパイル使用メモリ | 20,748 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-23 18:26:50 |
合計ジャッジ時間 | 914 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,348 KB |
testcase_01 | AC | 0 ms
4,348 KB |
testcase_02 | AC | 0 ms
4,348 KB |
testcase_03 | AC | 1 ms
4,348 KB |
testcase_04 | AC | 0 ms
4,348 KB |
testcase_05 | AC | 1 ms
4,348 KB |
testcase_06 | AC | 0 ms
4,348 KB |
testcase_07 | AC | 0 ms
4,348 KB |
testcase_08 | AC | 1 ms
4,348 KB |
testcase_09 | AC | 0 ms
4,348 KB |
testcase_10 | AC | 0 ms
4,348 KB |
コンパイルメッセージ
main.c: In function ‘run’: main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&p); | ^~~~~~~~~~~~~~ main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d%d",&n,&k); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> void run(void){ int p,n,k; scanf("%d",&p); int i; for(i=0;i<p;i++){ scanf("%d%d",&n,&k); printf("%s\n",(n-1)%(k+1)==0?"Lose":"Win"); } return; } int main(void){ run(); return 0; }