結果

問題 No.544 Delete 7
コンテスト
ユーザー y_taira_c
提出日時 2017-07-14 23:40:30
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 573µs
コード長 757 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 432 ms
コンパイル使用メモリ 109,676 KB
実行使用メモリ 9,872 KB
最終ジャッジ日時 2026-09-27 15:07:34
合計ジャッジ時間 2,807 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <sstream>
#include <vector>
#include <cmath>
#include <cstdio>
#include <chrono>
#include <unordered_map>



using namespace std;

typedef long long int ll;

#define REP(i,n) for(int i=0; i<(n); ++i )
#define REPR(i,n) for(int i=(n); i>=0; --i)
#define FOR(i,a,n) for(int i=(a); i<(n); ++i )
#define FORR(i,a,n) for(int i=(n); i>=(a); --i)

#define DOUT(x) cerr << #x << " = " << (x) << "\n";
#define COUT(x) cout << (x) << "\n";



signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	string n; cin >> n;
	string a="";
	REP(i, n.length())
	{
		if( n[i]=='7') a += "1";
		else a += "0";
	}
	ll ln = stoi(n);
	ll la = stoi(a);
	cout << la << " " << ln - la << "\n";
}
0