#include <bits/stdc++.h>
using namespace std;
void solve(int k) {
string s = to_string(k);
int v[] = {2,3,4,5,6};
cout<< ((s[0] - '0') - 1) * 10 + v[s.length()] << endl;
}
int main() {
int k =4 ; N = 5;
solve(k);
return 0;
}
C++โ
Accenture
using namespace std;
void solve(int k) {
string s = to_string(k);
int v[] = {2,3,4,5,6};
cout<< ((s[0] - '0') - 1) * 10 + v[s.length()] << endl;
}
int main() {
int k =4 ; N = 5;
solve(k);
return 0;
}
C++โ
Accenture
Python 3
Accenture โ
Accenture โ
Accenture
Python 3โ
Python 3โ
You canโt go back and change the beginning. But you can start from where you are & change the ending ๐
๐1
Accenture
C++โ
C++โ