#3525
soft_prime
Se dă un şir format din n
numere naturale nenule distincte. Afişaţi numerele prime din şir, în ordine crescătoare.
Problema | soft_prime | Operații I/O |
soft_prime.in /soft_prime.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #33367185 | Utilizator | |
Fișier | soft_prime.cpp | Dimensiune | 637 B |
Data încărcării | 15 Decembrie 2021, 23:57 | Scor / rezultat | Eroare de compilare |
soft_prime.cpp:1:1: error: expected unqualified-id before '<' token <?php ^ soft_prime.cpp:3:7: error: expected constructor, destructor, or type conversion before '(' token fscanf($file1,"%d",$n); ^ soft_prime.cpp:4:1: error: '$a' does not name a type $a[]=array(); ^ soft_prime.cpp:5:1: error: '$v' does not name a type $v[]=array(); ^ soft_prime.cpp:6:1: error: '$ct' does not name a type $ct=0; ^ soft_prime.cpp:7:1: error: '$i' does not name a type $i=0; ^ soft_prime.cpp:8:1: error: '$linie' does not name a type $linie=fgets($file1); ^ soft_prime.cpp:9:1: error: '$numbers' does not name a type $numbers=explode(" ",$linie); ^ soft_prime.cpp:10:8: error: expected constructor, destructor, or type conversion before '(' token foreach($numbers as $value) ^ soft_prime.cpp:15:7: error: expected constructor, destructor, or type conversion before '(' token fclose($file1); ^ soft_prime.cpp:16:1: error: expected unqualified-id before 'for' for($j=0;$j<$i;$j++) ^ soft_prime.cpp:16:10: error: '$j' does not name a type for($j=0;$j<$i;$j++) ^ soft_prime.cpp:16:16: error: '$j' does not name a type for($j=0;$j<$i;$j++) ^ soft_prime.cpp:32:5: error: expected constructor, destructor, or type conversion before '(' token sort($v); ^ soft_prime.cpp:33:1: error: '$file2' does not name a type $file2=fopen("soft_prime.out","w"); ^ soft_prime.cpp:34:1: error: expected unqualified-id before 'for' for($k=0;$k<$ct;$k++) ^ soft_prime.cpp:34:10: error: '$k' does not name a type for($k=0;$k<$ct;$k++) ^ soft_prime.cpp:34:17: error: '$k' does not name a type for($k=0;$k<$ct;$k++) ^ soft_prime.cpp:39:7: error: expected constructor, destructor, or type conversion before '(' token fclose($file2); ^ soft_prime.cpp:40:1: error: expected unqualified-id before '?' token ?> ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema soft_prime 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ă.