結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
めうめう🎒
|
| 提出日時 | 2016-03-27 23:10:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 815 bytes |
| コンパイル時間 | 1,044 ms |
| コンパイル使用メモリ | 82,828 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 11:58:39 |
| 合計ジャッジ時間 | 2,024 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <iomanip>
using namespace std;
#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
string a,b;
cin >> a >> b;
if(a.size() == b.size()){
for(int i = 0;i < a.size();i++){
if(a[i] == b[i]){
continue;
}else{
if(a[i] == '4' && b[i] == '7'){
cout << a << endl;
}else if(a[i] == '7' && b[i] == '4'){
cout << b << endl;
}else if(a[i] > b[i]){
cout << a << endl;
}else{
cout << b << endl;
}
break;
}
}
}else if(a.size() > b.size()){
cout << a << endl;
}else if(a.size() < b.size()){
cout << b << endl;
}
return 0;
}
めうめう🎒