結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
|
提出日時 | 2015-05-03 23:54:31 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 333 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 18:00:15 |
合計ジャッジ時間 | 696 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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<stdio.h> int main(){ int s1,s2; char p1[100],p2[100],x1[1],x2[1]; 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; }