DODUCK - Door Enclosure
Sule was a duck ranchman. Sule want to build a very large cage for his ducks. The cages also have a lot of doors. the door is open based on the number of ducks that will come out from the cage. If only one duck will come out, then only the first door will open. And if there are 2 ducks will come out, then second door will open. However, if there are 3 ducks then it will open 2 doors of the first door and the second door will open.
Your task is to determine which doors will be open if there are n ducks that will come out of the cage.
Input
The first line of input is an integer T which is the number of test case. T next line is the number n (1≤n≤21474836447) which represents the amount of ducks that will come out of the cage.
Output
The output is the doors that will open. If the doors that will open more than 1, then separate the output with space.
Example
Input: 4
1
2
3
4
Output: 1
2
1 2
3
hide comments
[Retired]:
2011-11-15 00:07:46
@Husnun Nashir : it had moved to tutorial. |
|
Pranay:
2011-11-14 13:53:32
is the answer of n = 10 : 2 4? Last edit: 2011-11-14 13:53:46 |
|
Husnun Nashir:
2011-11-14 13:41:55
bad explanation
|
|
Umar Hasan:
2011-11-14 13:41:55
bits Last edit: 2012-10-01 07:01:34 |
|
[Retired]:
2011-11-14 13:41:55
if input 5, the answer is 1 3.
|
|
Udit Poddar:
2011-11-14 13:41:55
Still completely stumbled as to how the output was 3 for input 4. And what will be the output for input 5. and 6 |
|
[Rampage] Blue.Mary:
2011-11-14 13:41:55
You may practice your guessing skills by this (nice?) problem. |
|
PRATEEK KHURANA:
2011-11-14 13:41:55
Still not able to get the problem statement |
|
Nur Ahmad Wahid:
2011-11-14 13:41:55
nice problem gan :D |
|
[Retired]:
2011-11-14 13:41:55
the problem statement has been updated. sorry for my bad english |
Added by: | [Retired] |
Date: | 2011-11-14 |
Time limit: | 0.100s-1s |
Source limit: | 200B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ADA95 ASM32 ASM64 BF CSHARP CLPS CLOJURE LISP sbcl LISP clisp D ERL FORTRAN GO HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PERL6 PHP PIKE PRLG-swi SCALA SCM guile SCM qobi ST TCL WHITESPACE |
Resource: | Own Problem |