Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.002 s | 0 KBi |
#2 |
Incorrecto
|
0.002 s | 0 KBi |
#3 |
Incorrecto
|
0.002 s | 0 KBi |
#4 |
Incorrecto
|
0.002 s | 0 KBi |
#5 |
Incorrecto
|
0.002 s | 0 KBi |
#6 |
Incorrecto
|
0.002 s | 0 KBi |
#7 |
Incorrecto
|
0.002 s | 0 KBi |
#8 |
Incorrecto
|
0.001 s | 0 KBi |
#9 |
Incorrecto
|
0.002 s | 0 KBi |
#10 |
Incorrecto
|
0.002 s | 0 KBi |
#11 |
Incorrecto
|
0.002 s | 0 KBi |
#12 |
Incorrecto
|
0.002 s | 0 KBi |
#13 |
Incorrecto
|
0.002 s | 0 KBi |
#14 |
Incorrecto
|
0.003 s | 0 KBi |
#15 |
Incorrecto
|
0.001 s | 0 KBi |
#16 |
Incorrecto
|
0.002 s | 0 KBi |
#17 |
Incorrecto
|
0.002 s | 0 KBi |
#18 |
Incorrecto
|
0.002 s | 0 KBi |
#19 |
Incorrecto
|
0.003 s | 0 KBi |
#20 |
Incorrecto
|
0.002 s | 0 KBi |
#21 |
Incorrecto
|
0.004 s | 1 KBi |
#22 |
Incorrecto
|
0.002 s | 0 KBi |
#23 |
Incorrecto
|
0.001 s | 0 KBi |
#24 |
Incorrecto
|
0.002 s | 0 KBi |
#25 |
Incorrecto
|
0.002 s | 0 KBi |
#26 |
Incorrecto
|
0.005 s | 1 KBi |
#27 |
Incorrecto
|
0.006 s | 1 KBi |
#28 |
Incorrecto
|
0.002 s | 0 KBi |
#29 |
Incorrecto
|
0.002 s | 0 KBi |
#30 |
Incorrecto
|
0.005 s | 1 KBi |
#31 |
Incorrecto
|
0.003 s | 0 KBi |
#32 |
Incorrecto
|
0.002 s | 0 KBi |
#33 |
Incorrecto
|
0.006 s | 0 KBi |
#34 |
Incorrecto
|
0.002 s | 0 KBi |
#include <bits/stdc++.h> using namespace std; void printCharArray(vector<char> arr, int size) { for(int i = 0; i < size; i++) cout<<arr[i]; cout<<endl; } void incrementNumber(vector<char> arr, int size) { for(int i = arr.size() - 1; i >= 0; i--) { int digit = arr[i] - '0'; if(digit < 9) { digit++; arr[i] = digit + 48; break; } else { arr[i] = 48; if(i == 0) { arr.insert(arr.begin(), '1'); } } } } int main() { string str; cin>>str; int k; cin>>k; vector<char> char_arr(str.begin(), str.end()); incrementNumber(char_arr, char_arr.size()); printCharArray(char_arr, char_arr.size()); return 0; }