-
Moderator:
Programare
WarGods Cheat Defender
[PBINFO] Problema #1004
Link site: You have to register to be able to see this link. Register HERE!
If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Link problema: You have to register to be able to see this link. Register HERE!
If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
-draguta problema, am mers pe ideea urmatoare: luam un vector unde stocam acei "eureni", primul fiind obligatoriu 1, iar celalti sunt puteri ale lui "e".
-nr de bancnote reprezinta catul impartirii lui S la un element al vectorului.Pentru a gasi bancnote a carei aparitii este macar 1, impunem conditia ca daca catul este 0 sa nu luam in considerare elementul respectiv al vectorului.
De exemplu pt e=5, vom avea in vector 1 5 25 125 625, cu S=107.Nu ne intereseaza 125, fiindca niciodata nu vom avea acel tip de bancnota(107/125=0, fals in conditia pe care am impus-o, trecem la 25 care corespunde).
C++ Code:
You have to register to be able to see this link. Register HERE!
If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Last edited by ~Wolf~; 11-01-2021 at 06:10 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules