#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 | #50898032 | Utilizator | |
Fișier | eratostene10.cpp | Dimensiune | 497 B |
Data încărcării | 13 Mai 2024, 12:09 | Scor / rezultat | Eroare de compilare |
eratostene10.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ eratostene10.cpp:5:1: error: stray '\302' in program int ciur[10001],n,i,j; ^ eratostene10.cpp:5:1: error: stray '\240' in program eratostene10.cpp:5:1: error: stray '\302' in program eratostene10.cpp:5:1: error: stray '\240' in program eratostene10.cpp:6:1: error: stray '\302' in program cout<<"n=";cin>>n; ^ eratostene10.cpp:6:1: error: stray '\240' in program eratostene10.cpp:6:1: error: stray '\302' in program eratostene10.cpp:6:1: error: stray '\240' in program eratostene10.cpp:7:1: error: stray '\302' in program for(i=2;i<=n;i++) ^ eratostene10.cpp:7:1: error: stray '\240' in program eratostene10.cpp:7:1: error: stray '\302' in program eratostene10.cpp:7:1: error: stray '\240' in program eratostene10.cpp:8:1: error: stray '\302' in program ciur[i]=1; //initial toate numerele sunt in ciur ^ eratostene10.cpp:8:1: error: stray '\240' in program eratostene10.cpp:8:1: error: stray '\302' in program eratostene10.cpp:8:1: error: stray '\240' in program eratostene10.cpp:8:1: error: stray '\302' in program eratostene10.cpp:8:1: error: stray '\240' in program eratostene10.cpp:8:1: error: stray '\302' in program eratostene10.cpp:8:1: error: stray '\240' in program eratostene10.cpp:9:1: error: stray '\302' in program for(i=2;i*i<=n;i++) ^ eratostene10.cpp:9:1: error: stray '\240' in program eratostene10.cpp:9:1: error: stray '\302' in program eratostene10.cpp:9:1: error: stray '\240' in program eratostene10.cpp:10:1: error: stray '\302' in program if(ciur[i]) ^ eratostene10.cpp:10:1: error: stray '\240' in program eratostene10.cpp:10:1: error: stray '\302' in program eratostene10.cpp:10:1: error: stray '\240' in program eratostene10.cpp:10:1: error: stray '\302' in program eratostene10.cpp:10:1: error: stray '\240' in program eratostene10.cpp:10:1: error: stray '\302' in program eratostene10.cpp:10:1: error: stray '\240' in program eratostene10.cpp:11:1: error: stray '\302' in program for(j=2;i*j<=n;j++) //elimin toti multiplii lui i ^ eratostene10.cpp:11:1: error: stray '\240' in program eratostene10.cpp:11:1: error: stray '\302' in program eratostene10.cpp:11:1: error: stray '\240' in program eratostene10.cpp:11:1: error: stray '\302' in program eratostene10.cpp:11:1: error: stray '\240' in program eratostene10.cpp:11:1: error: stray '\302' in program eratostene10.cpp:11:1: error: stray '\240' in program eratostene10.cpp:11:1: error: stray '\302' in program eratostene10.cpp:11:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program ciur[i*j]=0; ^ eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:12:1: error: stray '\302' in program eratostene10.cpp:12:1: error: stray '\240' in program eratostene10.cpp:13:1: error: stray '\302' in program for(i=2;i<=n;i++) ^ eratostene10.cpp:13:1: error: stray '\240' in program eratostene10.cpp:13:1: error: stray '\302' in program eratostene10.cpp:13:1: error: stray '\240' in program eratostene10.cpp:14:1: error: stray '\302' in program if(ciur[i]) cout<<i<<" "; ^ eratostene10.cpp:14:1: error: stray '\240' in program eratostene10.cpp:14:1: error: stray '\302' in program eratostene10.cpp:14:1: error: stray '\240' in program eratostene10.cpp:14:1: error: stray '\302' in program eratostene10.cpp:14:1: error: stray '\240' in program eratostene10.cpp:14:1: error: stray '\302' in program eratostene10.cpp:14:1: error: stray '\240' in program eratostene10.cpp:15:1: error: stray '\302' in program return 0; ^ eratostene10.cpp:15:1: error: stray '\240' in program eratostene10.cpp:15:1: error: stray '\302' in program eratostene10.cpp:15:1: error: stray '\240' in program eratostene10.cpp: In function 'int main()': eratostene10.cpp:6:7: error: 'cout' was not declared in this scope cout<<"n=";cin>>n; ^ eratostene10.cpp:6:12: error: 'lt' was not declared in this scope cout<<"n=";cin>>n; ^ eratostene10.cpp:6:20: error: 'quot' was not declared in this scope cout<<"n=";cin>>n; ^ eratostene10.cpp:6:34: error: 'cin' was not declared in this scope cout<<"n=";cin>>n; ^ eratostene10.cpp:6:38: error: 'gt' was not declared in this scope cout<<"n=";cin>>n; ^ eratostene10.cpp:6:46: warning: statement has no effect [-Wunused-value] cout<<"n=";cin>>n; ^ eratostene10.cpp:7:20: error: expected primary-expression before '=' token for(i=2;i<=n;i++) ^ eratostene10.cpp:7:22: error: expected ')' before ';' token for(i=2;i<=n;i++) ^ eratostene10.cpp:7:26: error: expected ';' before ')' token for(i=2;i<=n;i++) ^ eratostene10.cpp:9:22: error: expected primary-expression before '=' token for(i=2;i*i<=n;i++) ^ eratostene10.cpp:9:24: error: expected ')' before ';' token for(i=2;i*i<=n;i++) ^ eratostene10.cpp:9:28: error: expected ';' before ')' token for(i=2;i*i<=n;i++) ^ eratostene10.cpp:11:31: error: expected primary-expression before '=' token for(j=2;i*j<=n;j++) //elimin toti multiplii lui i ^ eratostene10.cpp:11:37: error: expected ';' before ')' token for(j=2;i*j<=n;j++) //elimin toti multiplii lui i ^ eratostene10.cpp:13:20: error: expected primary-expression before '=' token for(i=2;i<=n;i++) ^ eratostene10.cpp:13:22: error: expected ')' before ';' token for(i=2;i<=n;i++) ^ eratostene10.cpp:13:26: error: expected ';' before ')' token for(i=2;i<=n;i++) ^ eratostene10.cpp:5:11: warning: unused variable 'ciur' [-Wunused-variable] int ciur[10001],n,i,j; ^
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ă.