結果

問題 No.544 Delete 7
ユーザー furafura
提出日時 2020-05-04 18:25:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 282 bytes
コンパイル時間 2,821 ms
コンパイル使用メモリ 192,608 KB
最終ジャッジ日時 2025-01-10 06:26:51
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	string s; cin>>s;
	string t1,t2;
	for(char& c:s){
		if(c=='7'){
			t1+=c-1;
			t2+='1';
		}
		else{
			t1+=c;
			t2+='0';
		}
	}
	cout<<stoi(t1)<<' '<<stoi(t2)<<'\n';
	return 0;
}
0