#1981
DivizoriSir
Se dă următorul șir de numere naturale:
1, 3, 9, 25, 65, 161, 385, 897, 2049, 4609, 10241, 22529, 49153, 106497…
Pentru un număr natural n
, citit de la tastatură, afișati numărul de divizori pentru fiecare dintre primii n
termeni din șir.
Problema | DivizoriSir | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #22687068 | Utilizator | |
Fișier | divizorisir.cpp | Dimensiune | 917 B |
Data încărcării | 30 Aprilie 2020, 08:44 | Scor / rezultat | 0 puncte |
divizorisir.cpp: In function 'void sir(long long unsigned int&, long long unsigned int*)': divizorisir.cpp:37:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=2;i<=n;i++) ^ divizorisir.cpp: In function 'int main()': divizorisir.cpp:49:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1;i<=n;i++) ^ divizorisir.cpp:45:27: warning: unused variable 'p' [-Wunused-variable] unsigned long long n, p, v[65]={0}; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0.224 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0.228 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0.252 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0.444 secunde | Raspuns gresit. | 10 | 0 | ||
9 | Depășit | Limita de timp depășită | 10 | 0 | ||
10 | Depășit | Limita de timp depășită | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DivizoriSir 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ă.