Detalii evaluare #50898032

Rezumat problemă

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 Ai la Bj este R.

Detalii

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 Moraru Luca (Moraru_Luca)
Fișier eratostene10.cpp Dimensiune 497 B
Data încărcării 13 Mai 2024, 12:09 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

eratostene10.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
 #include &lt;iostream&gt;

          ^
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&lt;&lt;&quot;n=&quot;;cin&gt;&gt;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&lt;=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&lt;=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&lt;=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&lt;=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&lt;&lt;i&lt;&lt;&quot; &quot;;

 ^
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&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

       ^
eratostene10.cpp:6:12: error: 'lt' was not declared in this scope
     cout&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

            ^
eratostene10.cpp:6:20: error: 'quot' was not declared in this scope
     cout&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

                    ^
eratostene10.cpp:6:34: error: 'cin' was not declared in this scope
     cout&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

                                  ^
eratostene10.cpp:6:38: error: 'gt' was not declared in this scope
     cout&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

                                      ^
eratostene10.cpp:6:46: warning: statement has no effect [-Wunused-value]
     cout&lt;&lt;&quot;n=&quot;;cin&gt;&gt;n;

                                              ^
eratostene10.cpp:7:20: error: expected primary-expression before '=' token
     for(i=2;i&lt;=n;i++)

                    ^
eratostene10.cpp:7:22: error: expected ')' before ';' token
     for(i=2;i&lt;=n;i++)

                      ^
eratostene10.cpp:7:26: error: expected ';' before ')' token
     for(i=2;i&lt;=n;i++)

                          ^
eratostene10.cpp:9:22: error: expected primary-expression before '=' token
     for(i=2;i*i&lt;=n;i++)

                      ^
eratostene10.cpp:9:24: error: expected ')' before ';' token
     for(i=2;i*i&lt;=n;i++)

                        ^
eratostene10.cpp:9:28: error: expected ';' before ')' token
     for(i=2;i*i&lt;=n;i++)

                            ^
eratostene10.cpp:11:31: error: expected primary-expression before '=' token
           for(j=2;i*j&lt;=n;j++) //elimin toti multiplii lui i

                               ^
eratostene10.cpp:11:37: error: expected ';' before ')' token
           for(j=2;i*j&lt;=n;j++) //elimin toti multiplii lui i

                                     ^
eratostene10.cpp:13:20: error: expected primary-expression before '=' token
     for(i=2;i&lt;=n;i++)

                    ^
eratostene10.cpp:13:22: error: expected ')' before ';' token
     for(i=2;i&lt;=n;i++)

                      ^
eratostene10.cpp:13:26: error: expected ';' before ')' token
     for(i=2;i&lt;=n;i++)

                          ^
eratostene10.cpp:5:11: warning: unused variable 'ciur' [-Wunused-variable]
     int ciur[10001],n,i,j;

           ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Eratostene10 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.