Submission ID | Problem | Status | Score | Time | Memory | Code / Answer files | User | Submit time |
---|---|---|---|---|---|---|---|---|
#12917 | #52. Monodigit | Wrong Answer | 20 | 303 ms | 508 K | C++ 17 / 410 B | HKSC2023-400 | 2023-07-08 14:37:03 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, t, t2, ok;
cin >> n;
t = n;
a = 0;
while (t >= 10) {
t /= 10;
a += 9;
}
t2 = n;
ok = 0;
while (t2 >= 10) {
if (t2 % 10 < t) {
ok = 1;
break;
}
t2 /= 10;
}
a += t - ok;
cout << a << endl;
}
Your output
50
Checker message
Files user_out and answer differ
System message
Exited with return code 0
Your output
50
Checker message
Files user_out and answer differ
System message
Exited with return code 0
Your output
74
Checker message
Files user_out and answer differ
System message
Exited with return code 0