結果
問題 | No.544 Delete 7 |
ユーザー | masakiGit |
提出日時 | 2019-04-24 10:10:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 757 ms |
コンパイル使用メモリ | 67,460 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 10:02:54 |
合計ジャッジ時間 | 2,693 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include <iostream>#include <string>using namespace std;int main() {int n, x;cin >> n;string moji = to_string(n);int nagasa = moji.length();string henkan = "";for (int i = 0; i < nagasa; i++) {if (moji.substr(i, 1) == "7") {henkan += "6";}else {henkan += moji.substr(i, 1);}}x = atoi(henkan.c_str());cout << x << " " << n - x << endl;return 0;}