結果
問題 | No.544 Delete 7 |
ユーザー | algon_320 |
提出日時 | 2017-07-15 17:51:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 628 bytes |
コンパイル時間 | 1,348 ms |
コンパイル使用メモリ | 167,380 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 16:17:51 |
合計ジャッジ時間 | 3,011 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define REPF(i,a,n) for(int i=a;i<(int)(n);i++)#define REP(i,n) REPF(i,0,n)#define ALL(c) begin(a),end(a);#define RALL(c) rbegin(a),rend(a);#define SZ(c) (int)(c.size())int main() {string s,a,b;cin>>s;bool f=false;REP(i,SZ(s)) {if(s[i]=='7') {f=true;a.push_back('4');b.push_back('3');continue;}if(!f) {a.push_back(s[i]);}else {a.push_back('0');b.push_back(s[i]);}}cout<<a<<" "<<b<<endl;return 0;}