#1307
Siruri1
Se citeşte un şir X
de numere naturale cu n
elemente. Scrieţi un program care determină şirul Y
de numere prime distincte, care figurează la puterea întâi în cel puţin o descompunere ȋn factori primi a unui număr din șirul X
. Dacă niciun element al şirului X
nu are un factor prim la puterea întâi, atunci se va tipări mesajul Sirul Y e vid.
Problema | Siruri1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #16541905 | Utilizator | |
Fișier | siruri1.cpp | Dimensiune | 1.59 KB |
Data încărcării | 29 August 2019, 14:39 | Scor / rezultat | Eroare de compilare |
siruri1.cpp:13:2: error: stray '\302' in program for (int i = 0;i < n;i ++) ^ siruri1.cpp:13:2: error: stray '\240' in program siruri1.cpp:13:2: error: stray '\302' in program siruri1.cpp:13:2: error: stray '\240' in program siruri1.cpp:15:2: error: stray '\302' in program cin >> x[i]; ^ siruri1.cpp:15:2: error: stray '\240' in program siruri1.cpp:15:2: error: stray '\302' in program siruri1.cpp:15:2: error: stray '\240' in program siruri1.cpp:15:2: error: stray '\302' in program siruri1.cpp:15:2: error: stray '\240' in program siruri1.cpp:15:2: error: stray '\302' in program siruri1.cpp:15:2: error: stray '\240' in program siruri1.cpp:23:2: error: stray '\302' in program for (int i = 0;i < n;i ++) ^ siruri1.cpp:23:2: error: stray '\240' in program siruri1.cpp:23:2: error: stray '\302' in program siruri1.cpp:23:2: error: stray '\240' in program siruri1.cpp:25:2: error: stray '\302' in program cout << vector[i] << ' '; ^ siruri1.cpp:25:2: error: stray '\240' in program siruri1.cpp:25:2: error: stray '\302' in program siruri1.cpp:25:2: error: stray '\240' in program siruri1.cpp:25:2: error: stray '\302' in program siruri1.cpp:25:2: error: stray '\240' in program siruri1.cpp:25:2: error: stray '\302' in program siruri1.cpp:25:2: error: stray '\240' in program siruri1.cpp:33:2: error: stray '\302' in program y[k ++] = a; ^ siruri1.cpp:33:2: error: stray '\240' in program siruri1.cpp:33:2: error: stray '\302' in program siruri1.cpp:33:2: error: stray '\240' in program siruri1.cpp:41:2: error: stray '\302' in program if ( test == 1 ) ^ siruri1.cpp:41:2: error: stray '\240' in program siruri1.cpp:41:2: error: stray '\302' in program siruri1.cpp:41:2: error: stray '\240' in program siruri1.cpp:43:2: error: stray '\302' in program ConstruiereSir(a); ^ siruri1.cpp:43:2: error: stray '\240' in program siruri1.cpp:43:2: error: stray '\302' in program siruri1.cpp:43:2: error: stray '\240' in program siruri1.cpp:43:2: error: stray '\302' in program siruri1.cpp:43:2: error: stray '\240' in program siruri1.cpp:43:2: error: stray '\302' in program siruri1.cpp:43:2: error: stray '\240' in program siruri1.cpp:51:2: error: stray '\302' in program int d = 2,c; ^ siruri1.cpp:51:2: error: stray '\240' in program siruri1.cpp:51:2: error: stray '\302' in program siruri1.cpp:51:2: error: stray '\240' in program siruri1.cpp:53:2: error: stray '\302' in program while(a != 1) ^ siruri1.cpp:53:2: error: stray '\240' in program siruri1.cpp:53:2: error: stray '\302' in program siruri1.cpp:53:2: error: stray '\240' in program siruri1.cpp:55:2: error: stray '\302' in program { ^ siruri1.cpp:55:2: error: stray '\240' in program siruri1.cpp:55:2: error: stray '\302' in program siruri1.cpp:55:2: error: stray '\240' in program siruri1.cpp:57:2: error: stray '\302' in program c = 0; ^ siruri1.cpp:57:2: error: stray '\240' in program siruri1.cpp:57:2: error: stray '\302' in program siruri1.cpp:57:2: error: stray '\240' in program siruri1.cpp:57:2: error: stray '\302' in program siruri1.cpp:57:2: error: stray '\240' in program siruri1.cpp:57:2: error: stray '\302' in program siruri1.cpp:57:2: error: stray '\240' in program siruri1.cpp:59:2: error: stray '\302' in program while (a % d == 0) ^ siruri1.cpp:59:2: error: stray '\240' in program siruri1.cpp:59:2: error: stray '\302' in program siruri1.cpp:59:2: error: stray '\240' in program siruri1.cpp:59:2: error: stray '\302' in program siruri1.cpp:59:2: error: stray '\240' in program siruri1.cpp:59:2: error: stray '\302' in program siruri1.cpp:59:2: error: stray '\240' in program siruri1.cpp:61:2: error: stray '\302' in program { ^ siruri1.cpp:61:2: error: stray '\240' in program siruri1.cpp:61:2: error: stray '\302' in program siruri1.cpp:61:2: error: stray '\240' in program siruri1.cpp:61:2: error: stray '\302' in program siruri1.cpp:61:2: error: stray '\240' in program siruri1.cpp:61:2: error: stray '\302' in program siruri1.cpp:61:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program a /= d; ^ siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:63:2: error: stray '\302' in program siruri1.cpp:63:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program c ++; ^ siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:65:2: error: stray '\302' in program siruri1.cpp:65:2: error: stray '\240' in program siruri1.cpp:67:2: error: stray '\302' in program } ^ siruri1.cpp:67:2: error: stray '\240' in program siruri1.cpp:67:2: error: stray '\302' in program siruri1.cpp:67:2: error: stray '\240' in program siruri1.cpp:67:2: error: stray '\302' in program siruri1.cpp:67:2: error: stray '\240' in program siruri1.cpp:67:2: error: stray '\302' in program siruri1.cpp:67:2: error: stray '\240' in program siruri1.cpp:69:2: error: stray '\302' in program if ( c == 1 ) ^ siruri1.cpp:69:2: error: stray '\240' in program siruri1.cpp:69:2: error: stray '\302' in program siruri1.cpp:69:2: error: stray '\240' in program siruri1.cpp:69:2: error: stray '\302' in program siruri1.cpp:69:2: error: stray '\240' in program siruri1.cpp:69:2: error: stray '\302' in program siruri1.cpp:69:2: error: stray '\240' in program siruri1.cpp:71:2: error: stray '\302' in program { ^ siruri1.cpp:71:2: error: stray '\240' in program siruri1.cpp:71:2: error: stray '\302' in program siruri1.cpp:71:2: error: stray '\240' in program siruri1.cpp:71:2: error: stray '\302' in program siruri1.cpp:71:2: error: stray '\240' in program siruri1.cpp:71:2: error: stray '\302' in program siruri1.cpp:71:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program ok = 1; ^ siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:73:2: error: stray '\302' in program siruri1.cpp:73:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program PutereIntai(d,c); ^ siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:75:2: error: stray '\302' in program siruri1.cpp:75:2: error: stray '\240' in program siruri1.cpp:77:2: error: stray '\302' in program } ^ siruri1.cpp:77:2: error: stray '\240' in program siruri1.cpp:77:2: error: stray '\302' in program siruri1.cpp:77:2: error: stray '\240' in program siruri1.cpp:77:2: error: stray '\302' in program siruri1.cpp:77:2: error: stray '\240' in program siruri1.cpp:77:2: error: stray '\302' in program siruri1.cpp:77:2: error: stray '\240' in program siruri1.cpp:79:2: error: stray '\302' in program d ++; ^ siruri1.cpp:79:2: error: stray '\240' in program siruri1.cpp:79:2: error: stray '\302' in program siruri1.cpp:79:2: error: stray '\240' in program siruri1.cpp:79:2: error: stray '\302' in program siruri1.cpp:79:2: error: stray '\240' in program siruri1.cpp:79:2: error: stray '\302' in program siruri1.cpp:79:2: error: stray '\240' in program siruri1.cpp:81:2: error: stray '\302' in program } ^ siruri1.cpp:81:2: error: stray '\240' in program siruri1.cpp:81:2: error: stray '\302' in program siruri1.cpp:81:2: error: stray '\240' in program siruri1.cpp:90:2: error: stray '\302' in program for (int i = 0;i < n - 1;i ++) ^ siruri1.cpp:90:2: error: stray '\240' in program siruri1.cpp:90:2: error: stray '\302' in program siruri1.cpp:90:2: error: stray '\240' in program siruri1.cpp:92:2: error: stray '\302' in program { ^ siruri1.cpp:92:2: error: stray '\240' in program siruri1.cpp:92:2: error: stray '\302' in program siruri1.cpp:92:2: error: stray '\240' in program siruri1.cpp:94:2: error: stray '\302' in program int element = vector[i]; ^ siruri1.cpp:94:2: error: stray '\240' in program siruri1.cpp:94:2: error: stray '\302' in program siruri1.cpp:94:2: error: stray '\240' in program siruri1.cpp:94:2: error: stray '\302' in program siruri1.cpp:94:2: error: stray '\240' in program siruri1.cpp:94:2: error: stray '\302' in program siruri1.cpp:94:2: error: stray '\240' in program siruri1.cpp:96:2: error: stray '\302' in program for (int j = i + 1;j < n;j++) ^ siruri1.cpp:96:2: error: stray '\240' in program siruri1.cpp:96:2: error: stray '\302' in program siruri1.cpp:96:2: error: stray '\240' in program siruri1.cpp:96:2: error: stray '\302' in program siruri1.cpp:96:2: error: stray '\240' in program siruri1.cpp:96:2: error: stray '\302' in program siruri1.cpp:96:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program if (element == vector[j]) ^ siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:98:2: error: stray '\302' in program siruri1.cpp:98:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program { ^ siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:100:2: error: stray '\302' in program siruri1.cpp:100:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program for(int i = j ; i < n - 1; i ++) ^ siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:102:2: error: stray '\302' in program siruri1.cpp:102:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program vector[i] = vector[i+1]; ^ siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:104:2: error: stray '\302' in program siruri1.cpp:104:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program n --; ^ siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:106:2: error: stray '\302' in program siruri1.cpp:106:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program j --; ^ siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:108:2: error: stray '\302' in program siruri1.cpp:108:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program } ^ siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:110:2: error: stray '\302' in program siruri1.cpp:110:2: error: stray '\240' in program siruri1.cpp:112:2: error: stray '\302' in program } ^ siruri1.cpp:112:2: error: stray '\240' in program siruri1.cpp:112:2: error: stray '\302' in program siruri1.cpp:112:2: error: stray '\240' in program siruri1.cpp:122:2: error: stray '\302' in program cin >> n; ^ siruri1.cpp:122:2: error: stray '\240' in program siruri1.cpp:122:2: error: stray '\302' in program siruri1.cpp:122:2: error: stray '\240' in program siruri1.cpp:124:2: error: stray '\302' in program citire(); ^ siruri1.cpp:124:2: error: stray '\240' in program siruri1.cpp:124:2: error: stray '\302' in program siruri1.cpp:124:2: error: stray '\240' in program siruri1.cpp:126:2: error: stray '\302' in program for (int i = 0;i < n;i ++) ^ siruri1.cpp:126:2: error: stray '\240' in program siruri1.cpp:126:2: error: stray '\302' in program siruri1.cpp:126:2: error: stray '\240' in program siruri1.cpp:128:2: error: stray '\302' in program Descompunere(x[i]); ^ siruri1.cpp:128:2: error: stray '\240' in program siruri1.cpp:128:2: error: stray '\302' in program siruri1.cpp:128:2: error: stray '\240' in program siruri1.cpp:130:2: error: stray '\302' in program sort(y,y + k); ^ siruri1.cpp:130:2: error: stray '\240' in program siruri1.cpp:130:2: error: stray '\302' in program siruri1.cpp:130:2: error: stray '\240' in program siruri1.cpp:132:2: error: stray '\302' in program duplicate(y,k); ^ siruri1.cpp:132:2: error: stray '\240' in program siruri1.cpp:132:2: error: stray '\302' in program siruri1.cpp:132:2: error: stray '\240' in program siruri1.cpp:134:2: error: stray '\302' in program if (ok) ^ siruri1.cpp:134:2: error: stray '\240' in program siruri1.cpp:134:2: error: stray '\302' in program siruri1.cpp:134:2: error: stray '\240' in program siruri1.cpp:136:2: error: stray '\302' in program tiparire(y,k); ^ siruri1.cpp:136:2: error: stray '\240' in program siruri1.cpp:136:2: error: stray '\302' in program siruri1.cpp:136:2: error: stray '\240' in program siruri1.cpp:138:2: error: stray '\302' in program else ^ siruri1.cpp:138:2: error: stray '\240' in program siruri1.cpp:138:2: error: stray '\302' in program siruri1.cpp:138:2: error: stray '\240' in program siruri1.cpp:140:2: error: stray '\302' in program cout << "Sirul Y este vid."; ^ siruri1.cpp:140:2: error: stray '\240' in program siruri1.cpp:140:2: error: stray '\302' in program siruri1.cpp:140:2: error: stray '\240' in program siruri1.cpp:142:2: error: stray '\302' in program return 0; ^ siruri1.cpp:142:2: error: stray '\240' in program siruri1.cpp:142:2: error: stray '\302' in program siruri1.cpp:142:2: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Siruri1 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ă.