結果

問題 No.544 Delete 7
ユーザー masa
提出日時 2017-07-14 22:33:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 275 bytes
コンパイル時間 647 ms
コンパイル使用メモリ 66,384 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 16:04:06
合計ジャッジ時間 2,473 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
	string n;
	cin >> n;

	string a, b;
	for (auto c : n) {
		if (c == '7') {
			a += '6';
			b += '1';
		} else {
			a += c;
			b += '0';
		}
	}

	cout << stoi(a) << " " << stoi(b) << endl;
	return 0;
}
0