#1900
numere16
Se citește un număr natural n
cu cel mult 16
cifre. Fie q
numărul de cifre ale numărului n
. Prin eliminarea unei singure cifre din scrierea numărului n
se obține un șir de q
numere. Să se afișeze în ordine crescătoare, numerele nenule din acest șir care sunt prime cu numărul n
.
Problema | numere16 | Operații I/O |
numere16.in /numere16.out
|
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #4187781 | Utilizator | |
Fișier | numere16.cpp | Dimensiune | 641 B |
Data încărcării | 30 Ianuarie 2017, 14:17 | Scor / rezultat | Eroare de compilare |
numere16.cpp:7:1: error: stray '\342' in program ifstream f(“numere16.in”); ^ numere16.cpp:7:1: error: stray '\200' in program numere16.cpp:7:1: error: stray '\234' in program numere16.cpp:7:1: error: stray '\342' in program numere16.cpp:7:1: error: stray '\200' in program numere16.cpp:7:1: error: stray '\235' in program numere16.cpp:8:1: error: stray '\342' in program ofstream g(“numere16.out”); ^ numere16.cpp:8:1: error: stray '\200' in program numere16.cpp:8:1: error: stray '\234' in program numere16.cpp:8:1: error: stray '\342' in program numere16.cpp:8:1: error: stray '\200' in program numere16.cpp:8:1: error: stray '\235' in program numere16.cpp:13:1: error: stray '\342' in program for(i=1;i<=k;i++) {x=0; for(j=k;j>=1;j—) if(i!=j) x=x*10+v[j]; m++; w[m]=x; } ^ numere16.cpp:13:1: error: stray '\200' in program numere16.cpp:13:1: error: stray '\224' in program numere16.cpp:16:1: error: stray '\342' in program {a=n;b=w[i]; while(a*b!=0) if(a>b) a=a%b; else b=b%a; if(a==0) a=b; if (a==1) {c++;g<<w[i]<<” “;} ^ numere16.cpp:16:1: error: stray '\200' in program numere16.cpp:16:1: error: stray '\235' in program numere16.cpp:16:1: error: stray '\342' in program numere16.cpp:16:1: error: stray '\200' in program numere16.cpp:16:1: error: stray '\234' in program numere16.cpp:22:1: error: stray '\342' in program if(c==0) g<<“NU EXISTA”; ^ numere16.cpp:22:1: error: stray '\200' in program numere16.cpp:22:1: error: stray '\234' in program numere16.cpp:22:1: error: stray '\342' in program numere16.cpp:22:1: error: stray '\200' in program numere16.cpp:22:1: error: stray '\235' in program numere16.cpp: In function 'int main()': numere16.cpp:7:15: error: 'numere16' was not declared in this scope ifstream f(“numere16.in”); ^ numere16.cpp:13:38: warning: for increment expression has no effect [-Wunused-value] for(i=1;i<=k;i++) {x=0; for(j=k;j>=1;j—) if(i!=j) x=x*10+v[j]; m++; w[m]=x; } ^ numere16.cpp:16:100: error: expected primary-expression before ';' token {a=n;b=w[i]; while(a*b!=0) if(a>b) a=a%b; else b=b%a; if(a==0) a=b; if (a==1) {c++;g<<w[i]<<” “;} ^ numere16.cpp:22:16: error: 'NU' was not declared in this scope if(c==0) g<<“NU EXISTA”; ^ numere16.cpp:22:19: error: expected ';' before 'EXISTA' if(c==0) g<<“NU EXISTA”; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema numere16 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ă.