結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2017-01-17 22:09:53 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 447 bytes |
コンパイル時間 | 109 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 00:49:28 |
合計ジャッジ時間 | 850 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%s%s%c",sa,pa,&xa); | ^~~~~~~~~~~~~~~~~~~~~~~~~ main.c:16:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%s%s",sb,pb); | ^~~~~~~~~~~~~~~~~~~ main.c:18:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%c",&xb); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include<string.h> int main(void) { char sa[100]; char sb[100]; char pa[100000] ; char pb[100000]; char xa; char xb; long long a; long long b; scanf("%s%s%c",sa,pa,&xa); (void)getchar(); scanf("%s%s",sb,pb); (void)getchar(); scanf("%c",&xb); a=strlen(pa); b=strlen(pb); if(a>b){ printf("%s\n",sa); }else if(a<b){ printf("%s\n",sb); }else if(strlen(pa)==strlen(pb)){ printf("-1\n"); } return 0; }