Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.003 s | 0 KBi |
#2 |
Correcto
|
0.004 s | 1 KBi |
#3 |
Correcto
|
0.004 s | 0 KBi |
#4 |
Correcto
|
0.003 s | 2 KBi |
#5 |
Correcto
|
0.004 s | 1 KBi |
#6 |
Correcto
|
0.005 s | 0 KBi |
#7 |
Correcto
|
0.003 s | 4 KBi |
#8 |
Correcto
|
0.005 s | 0 KBi |
#9 |
Correcto
|
0.004 s | 1 KBi |
#10 |
Correcto
|
0.003 s | 1 KBi |
#11 |
Correcto
|
0.004 s | 0 KBi |
#12 |
Correcto
|
0.003 s | 0 KBi |
#include <iostream> using namespace std; int main() { string entrada; char currentLetter; int index = 0; bool repetido = false; cin >> entrada; while (index <= entrada.size() && !repetido) { currentLetter = entrada[index]; int index2 = 0; while (index2 < entrada.size() && !repetido) { if (index2 != index && entrada[index2] == currentLetter) { repetido = true; } index2++; } index++; } if (repetido) cout << "yes" << '\n'; else cout << "no" << '\n'; }