結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
![]() |
提出日時 | 2015-05-27 11:35:38 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 10:37:52 |
合計ジャッジ時間 | 916 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 14 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s%lld%c", sa, &pa, &xa); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s%lld%c", sb, &pb, &xb); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { char sa[101], sb[101]; long long int pa, pb; char xa, xb; scanf("%s%lld%c", sa, &pa, &xa); getchar(); scanf("%s%lld%c", sb, &pb, &xb); //printf("%lld\n", pa); if(pa > pb)printf("%s\n", sa); else if(pa < pb)printf("%s\n", sb); else printf("-1\n"); return 0; }