結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2016-06-28 17:53:22 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 23:29:09 |
合計ジャッジ時間 | 715 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:17:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d", &a); | ^~~~~~~~~~~~~~~ main.c:18:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%d", &b); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> void junken(int a, int b) { if(a == b){ printf("Drew\n"); } else if((a==0 && b==1) || (a==1 && b==2) || (a==2 && b==0)){ printf("Won\n"); } else if((a==0 && b==2) || (a==1 && b==0) || (a==2 && b==1)){ printf("Lost\n"); } } int main(void) { int a,b; scanf("%d", &a); scanf("%d", &b); if(a>2 || b>2){ printf("number is under 2\n"); } junken(a,b); return 0; }