#4508
Eratostene10
Se dau două șiruri A
și B
, fiecare format din câte N
numere naturale, și un număr natural R
. Aflați numărul perechilor (i,j)
pentru care restul împărțirii numărului A
i
la B
j
este R
.
Problema | Eratostene10 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50884351 | Utilizator | |
Fișier | eratostene10.cpp | Dimensiune | 376 B |
Data încărcării | 12 Mai 2024, 16:06 | Scor / rezultat | Eroare de compilare |
eratostene10.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include ‹fstream> ^ eratostene10.cpp:7:1: error: stray '\342' in program for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:1: error: stray '\202' in program eratostene10.cpp:7:1: error: stray '\254' in program eratostene10.cpp:8:1: error: stray '\342' in program in ›› temp: ^ eratostene10.cpp:8:1: error: stray '\200' in program eratostene10.cpp:8:1: error: stray '\272' in program eratostene10.cpp:8:1: error: stray '\342' in program eratostene10.cpp:8:1: error: stray '\200' in program eratostene10.cpp:8:1: error: stray '\272' in program eratostene10.cpp:13:1: error: stray '\342' in program for (int j= 1; j‹= freq[il; j++) { ^ eratostene10.cpp:13:1: error: stray '\200' in program eratostene10.cpp:13:1: error: stray '\271' in program eratostene10.cpp:14:1: error: stray '\343' in program out くくくく ^ eratostene10.cpp:14:1: error: stray '\201' in program eratostene10.cpp:14:1: error: stray '\217' in program eratostene10.cpp:14:1: error: stray '\343' in program eratostene10.cpp:14:1: error: stray '\201' in program eratostene10.cpp:14:1: error: stray '\217' in program eratostene10.cpp:14:1: error: stray '\343' in program eratostene10.cpp:14:1: error: stray '\201' in program eratostene10.cpp:14:1: error: stray '\217' in program eratostene10.cpp:14:1: error: stray '\343' in program eratostene10.cpp:14:1: error: stray '\201' in program eratostene10.cpp:14:1: error: stray '\217' in program eratostene10.cpp:16:1: error: stray '\342' in program if (temp % 20 == 0) out ‹< endl; ^ eratostene10.cpp:16:1: error: stray '\200' in program eratostene10.cpp:16:1: error: stray '\271' in program eratostene10.cpp:3:1: error: 'ifstream' does not name a type ifstream in("cifreord.in"); ^ eratostene10.cpp:4:1: error: 'ofstream' does not name a type ofstream out ("cifreord.out"); ^ eratostene10.cpp: In function 'int main()': eratostene10.cpp:7:10: error: expected unqualified-id before numeric constant for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:10: error: expected ';' before numeric constant eratostene10.cpp:7:12: error: lvalue required as left operand of assignment for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:19: warning: for increment expression has no effect [-Wunused-value] for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:24: error: expected ')' before ';' token for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:27: error: lvalue required as increment operand for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:7:29: error: expected ';' before ')' token for (int 1 = 1; 1 <= nr; 1++) € ^ eratostene10.cpp:6:5: warning: unused variable 'freq' [-Wunused-variable] int freq[10] = {0}, nr, temp; ^ eratostene10.cpp:6:25: warning: unused variable 'temp' [-Wunused-variable] int freq[10] = {0}, nr, temp; ^ eratostene10.cpp: At global scope: eratostene10.cpp:10:3: error: 'temp' does not name a type } temp =; ^ eratostene10.cpp:11:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene10 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ă.