結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-04 00:16:25 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 318 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 18:07:05 |
| 合計ジャッジ時間 | 750 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(){
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;
}