Submit | All submissions | Best solutions | Back to list |
DOL - Largest Odd Divisor |
Given a non-negative integers N. You have to find the largest odd divisor of N.
Input
Input starts with an integer T (1<=T<=5000) denoting the number of test cases. Each test case contains an integer N (1<=N<=1012).
Output
For each test case print the case number and the largest odd divisor of N.
Sample Input |
Output for Sample Input |
2 |
Case 1: 1 |
Problem Setter: Md Abdul Alim, Dept. of Computer Science, Bangladesh University of Business & Technology
Added by: | Alim |
Date: | 2015-09-09 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU JS-MONKEY |
Resource: | Own Problem |
hide comments
|
|||||
2021-07-27 18:20:23
O(sqrt(n)) solution will give TLE. O(log(n)) will be accepted. Last edit: 2021-07-27 20:10:22 |
|||||
2021-01-11 05:15:56
there is space between : and 1 in Case 1: 1 :-) Last edit: 2021-01-11 05:16:23 |
|||||
2020-06-09 10:54:57
AC in one Go!!! |
|||||
2019-04-13 23:01:58
very easy .. |
|||||
2019-01-06 23:43:37
never code with your headphones on, I repeat never. Costed me 2 WA's. |
|||||
2018-06-13 17:31:41
forgot to write "case " costed WA |
|||||
2017-06-18 09:29:31
Why is it DOL not LOd :P? Last edit: 2017-06-18 09:29:46 |
|||||
2017-05-30 19:36:15
easy :p nothing to cheer! |
|||||
2017-04-20 17:36:16
care about the output, cost me 10 wa |
|||||
2016-12-31 19:05:43
LOL |