結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2018-09-20 11:49:10 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 586 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 27,264 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 08:30:26 |
合計ジャッジ時間 | 845 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <stdio.h> #include <string.h> int main(void){ char Sa[101],Sb[101]; char Pa[10002],Pb[10002]; char Xa[2],Xb[2]; scanf("%s %s %s",Sa,Pa,Xa); scanf("%s %s %s",Sb,Pb,Xb); // measure each number's lengh if( strlen(Pa) > strlen(Pb) ){ printf("%s\n",Sa); }else if( strlen(Pa) < strlen(Pb) ){ printf("%s\n",Sb); }else{ // compare the value of Pa with Pb if( strcmp(Pa,Pb) > 0 ){ printf("%s\n",Sa); }else if( strcmp(Pa,Pb) < 0 ){ printf("%s\n",Sb); }else{ printf("-1\n"); } } return 0; }