The oldest man on earth Mr. Royal is a retired spy agent of BCI(Bangladesh Counter Intelligence). Since a retired man, he spent his leisure time by reading spy thriller books. When he reads book, he maintain a sequence of pages. If he reads **N** pages in one day, then next day he will read twice pages **(2*N)** of previous days. For example, if he reads **10** pages in **1st** day, then he reads **20** pages on **2nd** day, **40** pages on **3rd** day, **80** pages on **4th** day and so on. ![enter image description here][1] One day his great grandchildren asked him, which day did he read the **Kth** page of the book. Since Mr. Royal is a old man he is not able to keep track of pages and days. You have to help him to solve this. You are given the number of pages (**N**) he read on the first day, you have to find the day when he read the **Kth** page of the book. Input: ------ Input start with test cases **T**. Each test case there is two integer **N** and **K**, the number of pages read on the first day and the page number of the book. Constraints: ----- 1<=T<=100000 1<=N,K<=10^18 Output: ------- Print a line **'Case X: Y'** without quote mark. **X** is the case number start with **1** and **Y** is the answer. Sample Input ------------ 2 1 5 3 2 Sample Output ------------- Case 1: 3 Case 2: 1 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/7920b186-9731-c580-a694-08d521d5ee48_a0e87c8d1b5f423196934a6abc23840a_W197xH256.png

Monikrishna Roy

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

C# | 2.00 |

Go | 2.00 |

Java | 2.00 |

JavaScript | 2.00 |

Objective-C | 2.00 |

Perl | 2.00 |

PHP | 2.00 |

Python | 2.00 |

Python3 | 2.00 |

Ruby | 2.00 |

VB.Net | 2.00 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | astinaam | Cpp14 | 0.04s |

02 | FariD | Cpp14 | 0.04s |

03 | Morass | Cpp14 | 0.04s |

04 | Nazmul_WUB | Cpp | 0.05s |

05 | int_elligent | Cpp | 0.05s |

06 | lazyfahim | Cpp14 | 0.05s |

07 | SakibAlamin | Cpp14 | 0.05s |

08 | Fahim_41 | C | 0.05s |

09 | Dalu | Cpp | 0.05s |

10 | The_Viper | Cpp | 0.05s |

11 | neilanjona_mu | C | 0.05s |

12 | Shakil_Mahmud | Cpp | 0.05s |

13 | haasib | Cpp | 0.05s |

14 | nasib_mbstu | Cpp | 0.05s |

15 | pulak_ict_mbstu | Cpp | 0.05s |

16 | MRITuhin | Cpp | 0.05s |

17 | Ramprosad | Cpp | 0.05s |

18 | miltonbhowmick | Cpp14 | 0.06s |

19 | cse_nazmul | Cpp | 0.06s |

20 | Zihad | C | 0.06s |

21 | Durbin | Cpp14 | 0.06s |

22 | porag_ict | Cpp14 | 0.06s |

23 | Sarwar05 | Cpp | 0.06s |

24 | shuvo_mbstu | Cpp | 0.06s |

25 | kissu_pari_na | Cpp14 | 0.06s |

26 | showmic | Cpp | 0.06s |

27 | rayhan50001 | Cpp | 0.06s |

28 | Dragon_Curve | Cpp | 0.06s |

29 | mbstu_nitai | Cpp | 0.06s |

30 | Shahriar_88 | Cpp | 0.06s |

31 | arafat_hasan | Cpp14 | 0.06s |

32 | SaikatS | Cpp | 0.06s |

33 | saifkhan007420 | Cpp | 0.06s |

34 | Pure_Protea | Cpp14 | 0.06s |

35 | susmoys | Cpp | 0.06s |

36 | desh_chowdhury | Cpp | 0.06s |

37 | Nur_Alam39 | Cpp | 0.06s |

38 | Not_Found0001 | Cpp | 0.06s |

39 | Ishrak | Cpp | 0.06s |

40 | arafat666 | C | 0.06s |

41 | shishir09 | Cpp | 0.06s |

42 | feodorv | C | 0.06s |

43 | Sakhawat_CoU | Cpp14 | 0.06s |

44 | ssavi | Cpp | 0.06s |

45 | Tanmoy | Cpp | 0.06s |

46 | prodipdatta7 | Cpp | 0.06s |

47 | MRoy | Cpp | 0.06s |

48 | rohijulislam | Cpp | 0.06s |

49 | tariqiitju | Cpp14 | 0.07s |

50 | Jisancse | Cpp14 | 0.07s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(