結果
問題 | No.544 Delete 7 |
ユーザー |
|
提出日時 | 2017-07-16 18:00:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 357 bytes |
コンパイル時間 | 625 ms |
コンパイル使用メモリ | 69,660 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 16:19:55 |
合計ジャッジ時間 | 2,330 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> int main() { std::string n; std::cin >> n; int A = 0; int B = 0; for (int i = 0; i < n.size(); i++) { if (n[i] == '7') { A = 10 * A + 1; B = 10 * B + 6; } else { A = 10 * A + (n[i] - '0'); B = 10 * B + 0; } } std::cout << A << ' ' << B << std::endl; }