結果
問題 | No.544 Delete 7 |
ユーザー | 🍮かんプリン |
提出日時 | 2019-03-20 20:40:40 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 662 bytes |
コンパイル時間 | 522 ms |
コンパイル使用メモリ | 62,092 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 00:49:30 |
合計ジャッジ時間 | 2,712 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include <iostream>#include <vector>#include <utility>#include <algorithm>#include <string>#include <stack>using ll = long long;#define MOD 1000000007using namespace std;int main(){string N;bool f = false;cin >> N;for(int i = 0; i < (int)N.length(); i++){if (N[i] == '7') {cout << '6';}else {cout << N[i];}}cout << " ";for(int i = 0; i < (int)N.length(); i++){if (N[i] == '7') {cout << '1';f = true;}else if (f){cout << '0';}}cout << endl;return 0;}