Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

cniks117's blog

By cniks117, 12 years ago, In English

how can we compute the numbers of the series 2 ,4,6,10,14,22,30,46 .. for a number as large as 10^9 ?? here is my code http://ideone.com/0fuDO but it is too slow ..plz suggest me some faster method

  • Vote: I like it
  • -29
  • Vote: I do not like it

»
12 years ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

This task is currently part of CodeChef contest. You should not discuss/request help/share code with others

»
12 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Don't repeat my mistakes.

»
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it

but i m not asking the exact answer and neither have i posted the question...i m just asking if anybody can help me in building a strategy and learning new things