結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2017-01-31 14:30:48 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 22:33:03 |
合計ジャッジ時間 | 630 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d %d",&a,&b); | ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> void won(){ printf("Won\n"); } void lost(){ printf("Lost\n"); } int main(){ int a,b; scanf("%d %d",&a,&b); if(a==b){ printf("Drew\n"); return 0; } if(a==0&&b==1) won(); if(a==0&&b==2) lost(); if(a==1&&b==0) lost(); if(a==1&&b==2) won(); if(a==2&&b==0) won(); if(a==2&&b==1) lost(); return 0; }