Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.006 s | 2 KBi |
#2 |
Incorrecto
|
0.003 s | 2 KBi |
#3 |
Correcto
|
0.005 s | 1 KBi |
#4 |
Correcto
|
0.004 s | 2 KBi |
#5 |
Correcto
|
0.007 s | 13 KBi |
#6 |
Correcto
|
0.002 s | 2 KBi |
#7 |
Correcto
|
0.003 s | 2 KBi |
#8 |
Correcto
|
0.005 s | 10 KBi |
#9 |
Correcto
|
0.004 s | 2 KBi |
#10 |
Correcto
|
0.003 s | 2 KBi |
#11 |
Correcto
|
0.006 s | 2 KBi |
#12 |
Correcto
|
0.002 s | 2 KBi |
#13 |
Incorrecto
|
0.004 s | 2 KBi |
#14 |
Incorrecto
|
0.005 s | 11 KBi |
#15 |
Incorrecto
|
0.005 s | 1 KBi |
#16 |
Correcto
|
0.003 s | 2 KBi |
#17 |
Incorrecto
|
0.007 s | 6 KBi |
#18 |
Incorrecto
|
0.004 s | 2 KBi |
#19 |
Incorrecto
|
0.004 s | 2 KBi |
#20 |
Incorrecto
|
0.004 s | 66 KBi |
#21 |
Correcto
|
0.006 s | 2 KBi |
#22 |
Incorrecto
|
0.008 s | 13 KBi |
#23 |
Incorrecto
|
0.004 s | 2 KBi |
#24 |
Incorrecto
|
0.008 s | 1 KBi |
#25 |
Incorrecto
|
0.005 s | 2 KBi |
#26 |
Correcto
|
0.01 s | 1 KBi |
#27 |
Correcto
|
0.005 s | 1 KBi |
#28 |
Incorrecto
|
0.008 s | 11 KBi |
#29 |
Incorrecto
|
0.006 s | 2 KBi |
#30 |
Incorrecto
|
0.009 s | 8 KBi |
#31 |
Incorrecto
|
0.003 s | 2 KBi |
#32 |
Incorrecto
|
0.006 s | 2 KBi |
#33 |
Incorrecto
|
0.007 s | 2 KBi |
#34 |
Incorrecto
|
0.008 s | 8 KBi |
#include <bits/stdc++.h> using namespace std; #define PB push_back int main(){ char a; vector<int> arr; while(cin >> a) arr.PB(a - 48); reverse(arr.begin(), arr.end()); int carry = 1; for(int i = 0; i < arr.size(); ++i){ if(arr[i] == 9 and carry) arr[i] = 0; else{ arr[i] += 1; carry = 0; } } if(carry) arr.push_back(1); reverse(arr.begin(), arr.end()); for(int i: arr) cout << i; return 0; }