Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.008 s | 1 KBi |
#2 |
Correcto
|
0.007 s | 1 KBi |
#3 |
Correcto
|
0.008 s | 1 KBi |
#4 |
Correcto
|
0.008 s | 1 KBi |
#5 |
Correcto
|
0.007 s | 1 KBi |
#6 |
Correcto
|
0.008 s | 1 KBi |
#7 |
Correcto
|
0.011 s | 1 KBi |
#8 |
Correcto
|
0.01 s | 1 KBi |
#9 |
Correcto
|
0.011 s | 1 KBi |
#10 |
Correcto
|
0.01 s | 1 KBi |
#11 |
Correcto
|
0.012 s | 1 KBi |
#12 |
Correcto
|
0.011 s | 2 KBi |
#13 |
Correcto
|
0.738 s | 1 KBi |
#14 |
Correcto
|
0.6 s | 1 KBi |
#15 |
Tiempo límite excedido
|
0.704 s | 1 KBi |
#16 |
Tiempo límite excedido
|
0.938 s | 1 KBi |
#17 |
Correcto
|
0.026 s | 1 KBi |
#18 |
Correcto
|
0.031 s | 1 KBi |
#19 |
Correcto
|
0.253 s | 1 KBi |
#20 |
Correcto
|
0.032 s | 1 KBi |
#21 |
Correcto
|
0.03 s | 1 KBi |
#22 |
Correcto
|
0.011 s | 1 KBi |
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; char begin = s[0]; for(int i = 1;i < s.length(); i++){ if(s[i] == begin){ string sub = s.substr(0, s.length() - i); if(s.compare(i,sub.length(), sub) == 0){ count = sub.length(); break; } } } cout << count; return 0; }