結果

問題 No.544 Delete 7
ユーザー ミドリムシ
提出日時 2017-10-22 23:58:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 58,448 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 14:37:28
合計ジャッジ時間 2,394 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 34 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
    string N;
    cin >> N;
    string A = "";
    for(int i = 0; i < N.size(); i++){
        if(N[i] == '0'){
            A.push_back('9');
        }else if(N[i] != 8){
            A += to_string(N[i] - '1');
        }
    }
    cout << A << " " << stoi(N) - stoi(A) << endl;
}
0