#498
NumararePIE
Se dă un vector cu n
numere naturale. Să se determine câte dintre perechile de elemente din vector sunt prime între ele.
Problema | NumararePIE | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55036581 | Utilizator | |
Fișier | numararepie.cpp | Dimensiune | 835 B |
Data încărcării | 17 Decembrie 2024, 18:27 | Scor / rezultat | Eroare de compilare |
numararepie.cpp:7:1: error: stray '\302' in program int n, i, j, r, contor, a, b; ^ numararepie.cpp:7:1: error: stray '\240' in program numararepie.cpp:7:1: error: stray '\302' in program numararepie.cpp:7:1: error: stray '\240' in program numararepie.cpp:7:1: error: stray '\302' in program numararepie.cpp:7:1: error: stray '\240' in program numararepie.cpp:7:1: error: stray '\302' in program numararepie.cpp:7:1: error: stray '\240' in program numararepie.cpp:8:1: error: stray '\302' in program scanf( "%d", &n ); ^ numararepie.cpp:8:1: error: stray '\240' in program numararepie.cpp:8:1: error: stray '\302' in program numararepie.cpp:8:1: error: stray '\240' in program numararepie.cpp:8:1: error: stray '\302' in program numararepie.cpp:8:1: error: stray '\240' in program numararepie.cpp:8:1: error: stray '\302' in program numararepie.cpp:8:1: error: stray '\240' in program numararepie.cpp:10:1: error: stray '\302' in program for( i = 0; i < n; i++ ) ^ numararepie.cpp:10:1: error: stray '\240' in program numararepie.cpp:10:1: error: stray '\302' in program numararepie.cpp:10:1: error: stray '\240' in program numararepie.cpp:10:1: error: stray '\302' in program numararepie.cpp:10:1: error: stray '\240' in program numararepie.cpp:10:1: error: stray '\302' in program numararepie.cpp:10:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program scanf( "%d", &v[i] ); ^ numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:11:1: error: stray '\302' in program numararepie.cpp:11:1: error: stray '\240' in program numararepie.cpp:13:1: error: stray '\302' in program contor = 0; ^ numararepie.cpp:13:1: error: stray '\240' in program numararepie.cpp:13:1: error: stray '\302' in program numararepie.cpp:13:1: error: stray '\240' in program numararepie.cpp:13:1: error: stray '\302' in program numararepie.cpp:13:1: error: stray '\240' in program numararepie.cpp:13:1: error: stray '\302' in program numararepie.cpp:13:1: error: stray '\240' in program numararepie.cpp:14:1: error: stray '\302' in program for(i = 0; i < n - 1; i++ ) ^ numararepie.cpp:14:1: error: stray '\240' in program numararepie.cpp:14:1: error: stray '\302' in program numararepie.cpp:14:1: error: stray '\240' in program numararepie.cpp:14:1: error: stray '\302' in program numararepie.cpp:14:1: error: stray '\240' in program numararepie.cpp:14:1: error: stray '\302' in program numararepie.cpp:14:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program for(j = i + 1; j < n; j++ ){ ^ numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:15:1: error: stray '\302' in program numararepie.cpp:15:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program // aflu cmmdc dintre v[i] si v[j] ^ numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:16:1: error: stray '\302' in program numararepie.cpp:16:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program a = v[i]; ^ numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:17:1: error: stray '\302' in program numararepie.cpp:17:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program b = v[j]; ^ numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:18:1: error: stray '\302' in program numararepie.cpp:18:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program while( b > 0 ){ ^ numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:19:1: error: stray '\302' in program numararepie.cpp:19:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program r = a % b; ^ numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:20:1: error: stray '\302' in program numararepie.cpp:20:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program a = b; ^ numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:21:1: error: stray '\302' in program numararepie.cpp:21:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program b = r; ^ numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:22:1: error: stray '\302' in program numararepie.cpp:22:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program } ^ numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:23:1: error: stray '\302' in program numararepie.cpp:23:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program // daca cmmdc este 1 numerele sunt prime intre ele ^ numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:24:1: error: stray '\302' in program numararepie.cpp:24:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program if( a == 1 ){ ^ numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:25:1: error: stray '\302' in program numararepie.cpp:25:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program contor++; ^ numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:26:1: error: stray '\302' in program numararepie.cpp:26:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program //printf( "%d %d\n", v[i], v[j] ); ^ numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:27:1: error: stray '\302' in program numararepie.cpp:27:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program } ^ numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:28:1: error: stray '\302' in program numararepie.cpp:28:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program } ^ numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:29:1: error: stray '\302' in program numararepie.cpp:29:1: error: stray '\240' in program numararepie.cpp:31:1: error: stray '\302' in program cout<<"%d"<<contor; ^ numararepie.cpp:31:1: error: stray '\240' in program numararepie.cpp:31:1: error: stray '\302' in program numararepie.cpp:31:1: error: stray '\240' in program numararepie.cpp:31:1: error: stray '\302' in program numararepie.cpp:31:1: error: stray '\240' in program numararepie.cpp:31:1: error: stray '\302' in program numararepie.cpp:31:1: error: stray '\240' in program numararepie.cpp:32:1: error: stray '\302' in program return 0; ^ numararepie.cpp:32:1: error: stray '\240' in program numararepie.cpp:32:1: error: stray '\302' in program numararepie.cpp:32:1: error: stray '\240' in program numararepie.cpp:32:1: error: stray '\302' in program numararepie.cpp:32:1: error: stray '\240' in program numararepie.cpp:32:1: error: stray '\302' in program numararepie.cpp:32:1: error: stray '\240' in program numararepie.cpp: In function 'int main()': numararepie.cpp:31:9: error: 'cout' was not declared in this scope cout<<"%d"<<contor; ^ numararepie.cpp:31:9: note: suggested alternative: In file included from numararepie.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ numararepie.cpp:8:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf( "%d", &n ); ^ numararepie.cpp:11:39: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf( "%d", &v[i] ); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NumararePIE 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ă.