Editorial for Екінің дәрежелер тізімі
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Hint 1.
Екінің дәрежелері: 1, 2, 4, 8, ... — әрбір келесі сан алдыңғысын 2-ге көбейту арқылы алынады.
Hint 2.
Ең кіші дәрежеден бастап (\(1\)), келесі мәнді алу үшін әр қадамда 2-ге көбейтіп отырыңыз.
Hint 3.
\(1\)-ден бастап, мәнді 2-ге көбейтіп, ол \(n\)-нен аспайтын болғанша барлық мәндерді шығарыңыз.