結果
問題 |
No.544 Delete 7
|
ユーザー |
![]() |
提出日時 | 2017-07-14 23:10:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,496 bytes |
コンパイル時間 | 1,443 ms |
コンパイル使用メモリ | 168,540 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 16:12:20 |
合計ジャッジ時間 | 3,027 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<b;i++) #define fore(i,a) for(auto &i:a) #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------------------------- ∧_∧ ∧_∧ (´<_` ) Welcome to My Coding Space! ( ´_ゝ`) / ⌒i / \ | | / / ̄ ̄ ̄ ̄/ | __(__ニつ/ _/ .| .|____ \/____/ (u ⊃ ---------------------------------------------------------------------------------------------------*/ string N; //--------------------------------------------------------------------------------------------------- int parse(string &x) { int res = 0; fore(i, x) res = res * 10 + i - '0'; return res; } //--------------------------------------------------------------------------------------------------- void _main() { cin >> N; int len = N.length(); string A = "", B = ""; rep(i, 0, len) { if (N[i] == '7') { A += "1"; B += "6"; } else { A += "0"; B += N[i]; } } printf("%d %d\n", parse(A), parse(B)); }