#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 | #4187743 | Utilizator | |
Fișier | numere16.cpp | Dimensiune | 637 B |
Data încărcării | 30 Ianuarie 2017, 14:15 | 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:12:18: error: 'v' was not declared in this scope while(x>0) {k++; v[k]=x%10; x=x/10;} ^ 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:13:60: error: 'v' was not declared in this scope 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:71: error: 'w' was not declared in this scope 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:14:42: error: 'w' was not declared in this scope for(i=1;i<=m;i++) for(j=i+1;j<=m;j++) if(w[i]>w[j]) { aux=w[i]; w[i]=w[j]; w[j]=aux;} ^ numere16.cpp:16:8: error: 'w' was not declared in this scope {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: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”; ^ numere16.cpp:5:25: warning: unused variable 'w17' [-Wunused-variable] {unsigned long long n,x,w17,aux,a,b; ^ numere16.cpp:6:9: warning: unused variable 'v17' [-Wunused-variable] int c=0,v17,i,k=0,m=0,j; ^
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ă.