結果
問題 |
No.293 4>7の世界
|
ユーザー |
|
提出日時 | 2020-04-27 04:57:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 2,568 ms |
コンパイル使用メモリ | 191,960 KB |
最終ジャッジ日時 | 2025-01-10 02:26:38 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ string a,b; cin>>a>>b; int m=a.length(),n=b.length(); if(m!=n) cout<<(m>n?a:b)<<'\n'; else{ int i; for(i=0;a[i]==b[i];i++); cout<<(a[i]=='4'&&b[i]=='7'?a:a[i]=='7'&&b[i]=='4'?b:a[i]>b[i]?a:b)<<'\n'; } return 0; }