#3070
Se citesc două numere a și b reprezentând lungimile laturilor unui dreptunghi. Pentru dreptunghiul dat, să se calculeze: perimetrul P, aria A și pătratul lungimii diagonalei D.
| Problema | dreptunghi | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64075176 | Utilizator | |
| Fișier | dreptunghi.c | Dimensiune | 231 B |
| Data încărcării | 15 Aprilie 2026, 18:26 | Scor/rezultat | 100 puncte |
dreptunghi.c: In function ‘main’: dreptunghi.c:7:16: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=] 7 | if(scanf("%d %d", &a, &b)!=2)return 0; | ~^ ~~ | | | | int * long long int * | %lld dreptunghi.c:7:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long long int *’ [-Wformat=] 7 | if(scanf("%d %d", &a, &b)!=2)return 0; | ~^ ~~ | | | | int * long long int * | %lld dreptunghi.c:13:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 13 | printf("%d %d %d", P, A, D); | ~^ ~ | | | | int long long int | %lld dreptunghi.c:13:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=] 13 | printf("%d %d %d", P, A, D); | ~^ ~ | | | | int long long int | %lld dreptunghi.c:13:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long long int’ [-Wformat=] 13 | printf("%d %d %d", P, A, D); | ~^ ~ | | | | int long long int | %lld
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema dreptunghi 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ă.