#2680
Poezie
Se citește un număr n
, și n
versuri dintr-o poezie. Fiecare vers ocupă un rând și conține litere mari și mici ale alfabetului englez, spații, și semne de punctuație . , ! ?
. Să se elimine din fiecare vers toate semnele de punctuație, mai puțin cel aflat la final.
Problema | Poezie | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20895532 | Utilizator | |
Fișier | poezie.cpp | Dimensiune | 426 B |
Data încărcării | 13 Februarie 2020, 15:36 | Scor / rezultat | 0 puncte |
poezie.cpp: In function 'int main()': poezie.cpp:15:9: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ poezie.cpp:15:15: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ poezie.cpp:17:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<strlen(s);j++) ^ poezie.cpp:19:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(!isalnum(s[j])&&j<strlen(s)-1&&!isspace(s[i])) strcpy(s+j,s+j+1); ^ poezie.cpp:11:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ poezie.cpp:15:16: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccwytif6.o: In function \`main': poezie.cpp:(.text.startup+0x64): warning: the \`gets' function is dangerous and should not be used.
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Poezie 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ă.