結果

問題 No.293 4>7の世界
ユーザー 158b158b
提出日時 2015-11-10 11:17:36
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 877 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 83,360 KB
実行使用メモリ 4,476 KB
最終ジャッジ日時 2023-10-11 15:30:44
合計ジャッジ時間 1,797 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <climits>
#include <vector>
#include <numeric>
#include <complex>
#include <map>
#include <bitset>
#include <stack>
#include <queue>
#include <set>
using namespace std;

//#define __int64 long long
#define long __int64
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
const int Vec = 4;
const int Vecy[Vec] = {0,-1,0,1};
const int Vecx[Vec] = {1,0,-1,0};
const int Modd = 1000000007;

int convert(string in){
	int res = 0;
	for(int i=0; i<in.length(); i++){
		res *= 10;
		if(in[i] == '4'){
			res += 7;
		}else if(in[i] == '7'){
			res += 4;
		}else{
			res += (in[i] - '0');
		}
	}
	
	return res;
}


int main(){
	string ina,inb;
	
	cin >> ina >> inb;
	
	if(convert(ina) >= convert(inb)){
		cout << ina << endl;
	}else{
		cout << inb << endl;
	}
    
    return 0;
}
0