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