#1767
multiple
Sergiu trebuie să răspundă la T
întrebări de forma: Care este cel mai mic număr strict mai mare decât n
, divizibil cu k
?
ad-hoc
Problema | multiple | Operații I/O |
multiple.in /multiple.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49908024 | Utilizator | |
Fișier | multiple.c | Dimensiune | 295 B |
Data încărcării | 19 Martie 2024, 16:11 | Scor / rezultat | Eroare de compilare |
multiple.c: In function 'main': multiple.c:7:1: error: unknown type name 'file' file *r,*w; ^ multiple.c:8:2: warning: assignment from incompatible pointer type [enabled by default] r=fopen( "multiple.in", "r"); ^ multiple.c:9:2: warning: assignment from incompatible pointer type [enabled by default] w=fopen( "multiple.out", "w"); ^ multiple.c:10:17: error: 'n' undeclared (first use in this function) fscanf(r,"%d", &n); ^ multiple.c:10:17: note: each undeclared identifier is reported only once for each function it appears in multiple.c:10:1: warning: passing argument 1 of 'fscanf' from incompatible pointer type [enabled by default] fscanf(r,"%d", &n); ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from multiple.c:1: /usr/include/stdio.h:443:12: note: expected 'struct FILE * restrict' but argument is of type 'int *' extern int __REDIRECT (fscanf, (FILE *__restrict __stream, ^ multiple.c:11:1: warning: passing argument 1 of 'fprintf' from incompatible pointer type [enabled by default] fprintf(w,"%d",&n); ^ In file included from /usr/include/stdio.h:937:0, from multiple.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:95:1: note: expected 'struct FILE * restrict' but argument is of type 'int *' fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) ^ multiple.c:15:21: error: called object 'c' is not a function or function pointer fprintf("%d", c(k+1)); ^ multiple.c:12:11: note: declared here int i,a,b,c,k; ^ multiple.c:15:6: warning: passing argument 1 of 'fprintf' from incompatible pointer type [enabled by default] fprintf("%d", c(k+1)); ^ In file included from /usr/include/stdio.h:937:0, from multiple.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:95:1: note: expected 'struct FILE * restrict' but argument is of type 'char *' fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) ^ multiple.c:17:5: error: too few arguments to function 'fprintf' fprintf() ^ multiple.c:18:1: error: expected ';' before '}' token } ^ multiple.c:12:9: warning: unused variable 'b' [-Wunused-variable] int i,a,b,c,k; ^ multiple.c:12:7: warning: unused variable 'a' [-Wunused-variable] int i,a,b,c,k; ^ multiple.c: At top level: multiple.c:19:1: error: expected identifier or '(' before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema multiple 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ă.