#1894
Floarea
O floare abia plantată se notează cu 0
. În fiecare lună, aceasta crește cu un rând de petale, separate prin spațiu, notate cu cifra vârstei sale în acea lună.
Se dă un număr natural n
. Construiți și afișați o matrice ce reprezinta floarea dupa n
luni.
Problema | Floarea | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #44087051 | Utilizator | |
Fișier | floarea.cpp | Dimensiune | 1.11 KB |
Data încărcării | 19 Iunie 2023, 20:04 | Scor / rezultat | 100 puncte |
floarea.cpp: In function 'int main()': floarea.cpp:11:14: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] if (i==0 | j==0 | i==2*n | j==2*n) ^ floarea.cpp:11:28: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] if (i==0 | j==0 | i==2*n | j==2*n) ^ floarea.cpp:11:37: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] if (i==0 | j==0 | i==2*n | j==2*n) ^ floarea.cpp:14:19: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if (i==1 | j==1 | i==2*n-1 | j==2*n-1) ^ floarea.cpp:14:33: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if (i==1 | j==1 | i==2*n-1 | j==2*n-1) ^ floarea.cpp:14:44: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if (i==1 | j==1 | i==2*n-1 | j==2*n-1) ^ floarea.cpp:17:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==2 | j==2 | i==2*n-2 | j==2*n-2) ^ floarea.cpp:17:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==2 | j==2 | i==2*n-2 | j==2*n-2) ^ floarea.cpp:17:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==2 | j==2 | i==2*n-2 | j==2*n-2) ^ floarea.cpp:20:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==3 | j==3 | i==2*n-3 | j==2*n-3) ^ floarea.cpp:20:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==3 | j==3 | i==2*n-3 | j==2*n-3) ^ floarea.cpp:20:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==3 | j==3 | i==2*n-3 | j==2*n-3) ^ floarea.cpp:23:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==4 | j==4 | i==2*n-4 | j==2*n-4) ^ floarea.cpp:23:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==4 | j==4 | i==2*n-4 | j==2*n-4) ^ floarea.cpp:23:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==4 | j==4 | i==2*n-4 | j==2*n-4) ^ floarea.cpp:26:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==5 | j==5 | i==2*n-5 | j==2*n-5) ^ floarea.cpp:26:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==5 | j==5 | i==2*n-5 | j==2*n-5) ^ floarea.cpp:26:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==5 | j==5 | i==2*n-5 | j==2*n-5) ^ floarea.cpp:29:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==6 | j==6 | i==2*n-6 | j==2*n-6) ^ floarea.cpp:29:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==6 | j==6 | i==2*n-6 | j==2*n-6) ^ floarea.cpp:29:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==6 | j==6 | i==2*n-6 | j==2*n-6) ^ floarea.cpp:32:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==7 | j==7 | i==2*n-7 | j==2*n-7) ^ floarea.cpp:32:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==7 | j==7 | i==2*n-7 | j==2*n-7) ^ floarea.cpp:32:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==7 | j==7 | i==2*n-7 | j==2*n-7) ^ floarea.cpp:35:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==8 | j==8 | i==2*n-8 | j==2*n-8) ^ floarea.cpp:35:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==8 | j==8 | i==2*n-8 | j==2*n-8) ^ floarea.cpp:35:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==8 | j==8 | i==2*n-8 | j==2*n-8) ^ floarea.cpp:38:18: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==9 | j==9 | i==2*n-9 | j==2*n-9) ^ floarea.cpp:38:32: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==9 | j==9 | i==2*n-9 | j==2*n-9) ^ floarea.cpp:38:43: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses] else if(i==9 | j==9 | i==2*n-9 | j==2*n-9) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 20 | 20 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Floarea 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ă.