結果
問題 | No.544 Delete 7 |
ユーザー |
![]() |
提出日時 | 2017-07-14 22:32:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 765 ms |
コンパイル使用メモリ | 83,200 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 16:03:55 |
合計ジャッジ時間 | 2,575 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include<iostream>#include<math.h>#include<vector>#include<algorithm>#include<queue>#include<set>#include<map>#define REP(i, n) for(long long i = 0; i < n; ++i)#define ALL(a) a.begin(), a.end()using namespace std;typedef long long ll;typedef pair<ll, ll> P;int main() {int n;cin>>n;string n_s = to_string(n);string res_s = "";REP(i, n_s.size()) {if(n_s[i] == '7') {res_s += '1';} else {res_s += '0';}}int res = stoi(res_s);cout<<res<<" "<<n - res<<endl;}