#2263
Camioane
O firmă are două tipuri de camioane: camioane de tipul 1
, care pot transporta câte t1
tone de marfă pe zi, și camioane de tipul 2
, care pot transporta câte t2
tone de marfă pe zi.
Știind că firma are n
camioane de tipul 1
și m
camioane de tipul 2
, câte tone de marfă pot transporta camioanele firmei în z
zile.
Problema | Camioane | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23587547 | Utilizator | |
Fișier | camioane.c | Dimensiune | 174 B |
Data încărcării | 31 Iulie 2020, 17:00 | Scor / rezultat | Eroare de compilare |
camioane.c: In function 'main': camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=] scanf("%d %d %d %d %d",t1,t2,n,m,z); ^ camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'int' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'int' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 6 has type 'int' [-Wformat=] camioane.c:8:29: error: 'Z' undeclared (first use in this function) printf("%d",(n*t1+m*t2)*Z); ^ camioane.c:8:29: note: each undeclared identifier is reported only once for each function it appears in camioane.c:6:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d %d %d",t1,t2,n,m,z); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Camioane 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ă.