結果
問題 | No.544 Delete 7 |
ユーザー |
![]() |
提出日時 | 2017-07-14 22:47:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 653 bytes |
コンパイル時間 | 1,487 ms |
コンパイル使用メモリ | 161,948 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 16:09:40 |
合計ジャッジ時間 | 3,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include <bits/stdc++.h>#define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++)#define REP(i,n) FOR(i,0,n)#define MOD 1000000007#define int long longusing namespace std;typedef long long ll;const int INF = 1e9;signed main(){int N;cin >> N;string NStr = to_string(N);string A="", B="";int len = NStr.length();REP(i,len) {if (NStr[i] != '7') {A += '0';B += NStr[i];} else {A += '1';B += '6';}}//cout << "A = " << A << endl;//cout << "B = " << B << endl;int a = stoi(A), b = stoi(B);cout << a << " " << b << endl;}