#3141
atbash
Cifrul atbash este un cifru de substituție care constă în inversarea alfabetului: prima literă din alfabet se interschimbă cu ultima, a doua cu penultima, etc.
Se dă un șir s
care conține doar litere mari. Să se aplice cifrul atbash pe el.
Problema | atbash | Operații I/O |
atbash.in /atbash.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #53823303 | Utilizator | |
Fișier | atbash.cpp | Dimensiune | 1.78 KB |
Data încărcării | 12 Noiembrie 2024, 15:28 | Scor / rezultat | 0 puncte |
atbash.cpp: In function 'int main()': atbash.cpp:14:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0; j < strlen(s); j++) ^ atbash.cpp:16:22: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(s[j] = 'A') ^ atbash.cpp:18:28: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'B') ^ atbash.cpp:20:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'C') ^ atbash.cpp:22:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'D') ^ atbash.cpp:24:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'E') ^ atbash.cpp:26:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'F') ^ atbash.cpp:28:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'G') ^ atbash.cpp:30:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'H') ^ atbash.cpp:32:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'I') ^ atbash.cpp:34:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'J') ^ atbash.cpp:36:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'K') ^ atbash.cpp:38:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'L') ^ atbash.cpp:40:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'M') ^ atbash.cpp:42:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'N') ^ atbash.cpp:44:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'O') ^ atbash.cpp:46:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'P') ^ atbash.cpp:48:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'Q') ^ atbash.cpp:50:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'R') ^ atbash.cpp:52:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'S') ^ atbash.cpp:54:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'T') ^ atbash.cpp:56:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'U') ^ atbash.cpp:58:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'V') ^ atbash.cpp:60:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'W') ^ atbash.cpp:62:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'X') ^ atbash.cpp:64:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'Y') ^ atbash.cpp:66:32: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(s[j] = 'Z') ^ atbash.cpp:11:9: warning: variable 'i' set but not used [-Wunused-but-set-variable] int i; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
14 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
17 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
18 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
20 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema atbash face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.