#2247
Se consideră un număr natural N
care este par. Să se determine cel mai mic număr natural impar M
care are același număr de divizori ca și N
.
Problema | NrDiv | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43556898 | Utilizator | |
Fișier | nrdiv.cpp | Dimensiune | 1.03 KB |
Data încărcării | 03 Mai 2023, 13:00 | Scor / rezultat | Eroare de compilare |
nrdiv.cpp: In function 'void backt(int, int)': nrdiv.cpp:33:12: error: 'c' was not declared in this scope if(c[s[1]]!=c[s[m]]) ^ nrdiv.cpp:33:14: error: 's' was not declared in this scope if(c[s[1]]!=c[s[m]]) ^ nrdiv.cpp:34:16: error: 'sp' was not declared in this scope if(sp>pmax) ^ nrdiv.cpp:34:19: error: 'pmax' was not declared in this scope if(sp>pmax) ^ nrdiv.cpp:37:39: error: 'sol' was not declared in this scope for(int j=1;j<=m;j++) sol[j]=s[j]; ^ nrdiv.cpp:40:35: error: 'viz' was not declared in this scope else for(int j=1;j<=n;j++) if(viz[j]==0) ^ nrdiv.cpp:43:17: error: 'c' was not declared in this scope if(i>1&&c[s[i-1]]==c[j]) ok=false; ^ nrdiv.cpp:43:19: error: 's' was not declared in this scope if(i>1&&c[s[i-1]]==c[j]) ok=false; ^ nrdiv.cpp:46:13: error: 's' was not declared in this scope s[i]=j; ^ nrdiv.cpp:48:23: error: 'sp' was not declared in this scope backt(i+1,sp+p[j]); ^ nrdiv.cpp:48:26: error: 'p' was not declared in this scope backt(i+1,sp+p[j]); ^ nrdiv.cpp: In function 'int main()': nrdiv.cpp:55:12: error: 'citire' was not declared in this scope citire(); ^ nrdiv.cpp:57:33: error: 'sol' was not declared in this scope for(int i=1;i<=m;i++) cout<<sol[i]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrDiv 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ă.