aboutsummaryrefslogtreecommitdiff
path: root/max_69.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'max_69.cpp')
-rw-r--r--max_69.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/max_69.cpp b/max_69.cpp
deleted file mode 100644
index bc8abeb..0000000
--- a/max_69.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "leetcode.h"
-
-class Solution {
-public:
- int maximum69Number(int num) {
- if (num == 9999)
- return num;
- string n = to_string(num);
- for (auto &i : n)
- if (i == '6') {
- i = '9';
- break;
- }
- return stoi(n);
- }
-};
-
-int main() {
- Solution obj;
- cout << obj.maximum69Number(9669);
-}