結果

問題 No.293 4>7の世界
ユーザー HAHAHAHAHAHA
提出日時 2015-10-24 13:20:31
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,011 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 73,424 KB
実行使用メモリ 4,476 KB
最終ジャッジ日時 2023-10-11 05:36:57
合計ジャッジ時間 1,620 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
4,348 KB
testcase_07 WA -
testcase_08 AC 1 ms
4,348 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,352 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
4,348 KB
testcase_15 WA -
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,352 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<utility>
#include<sstream>
#include<cctype>
#include<cmath>
#include<algorithm>
using namespace std;

#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define rev(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define repp(i,n) for(int (i)=1;(i)<=(n);(i)++)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rev(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define clr(a) memset((a), 0 ,sizeof(a))


typedef pair<int,int> P;
typedef vector<pair<int,int> > pii;
typedef map<string,int> mi;


int main(){
	string s,s2;
	cin >> s >> s2;
	if(s.size()>s2.size()) cout << s << endl;
	else if(s.size()<s2.size()) cout << s2 << endl;
	else
	for(int i=0;i<s.size();i++){
		if(s[i]>s2[i]&&s[i]!='7'&&s2[i]!='4'){
			cout << s << endl;
			return 0;
		}
		if(s[i]<s2[i]&&s[i]!='4'&&s2[i]!='7'){
			cout << s2 << endl;
			return 0;
		}
	}
	return 0;
}
0