結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2016-11-05 11:33:55 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 655 ms |
コンパイル使用メモリ | 19,200 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-25 03:03:26 |
合計ジャッジ時間 | 865 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 15 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s %d %c", na, &pa, &ta); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s %d %c", nb, &pb, &tb); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { int pa,pb; char na[101], nb[101], ta,tb; scanf("%s %d %c", na, &pa, &ta); scanf("%s %d %c", nb, &pb, &tb); if(pa>pb){ printf("%s\n", na); }else if(pb>pa){ printf("%s\n", nb); }else{ printf("-1\n"); } return 0; }