結果
| 問題 | No.293 4>7の世界 |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-10-23 22:41:33 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 434 bytes |
| 記録 | |
| コンパイル時間 | 334 ms |
| コンパイル使用メモリ | 53,792 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-03 11:59:11 |
| 合計ジャッジ時間 | 1,246 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 17 WA * 3 |
ソースコード
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
//namaega184
int main(){
char a[100001],b[100001];scanf("%s%s",a,b);
int la=strlen(a),lb=strlen(b);
if(la<lb){b:printf("%s\n",b);return 0;}
else if(la>lb){a:printf("%s\n",a);return 0;}
else{
for(int i=0;i<la;i++){
if(a[i]=='7'&&b[i]=='4'||a[i]<b[i])goto b;
else if(a[i]=='4'&&b[i]=='7'||a[i]>b[i])goto a;
}
}
printf("-1\n");
return 0;
}
184