結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
|
提出日時 | 2015-05-04 00:00:03 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-05 18:02:19 |
合計ジャッジ時間 | 719 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 15 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s %d %s", p1, &s1, x1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s %d %s", p2, &s2, x2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> int main(){ int s1,s2; char p1[101],p2[101],x1[2],x2[2]; scanf("%s %d %s", p1, &s1, x1); scanf("%s %d %s", p2, &s2, x2); if(s1>s2){ printf("%s\n",p1); }else if(s1<s2){ printf("%s\n",p2); }else{ printf("%d\n",-1); } return 0; }