All submissions for this problem are available.Today, Chef and his friends wants to eat fruits, particularly apples, oranges and watermelon. An apple increases their energy by one unit, an orange increases their energy by two unit and a watermelon by three units. They have to recharge their energy to exactly $n$ units such that they use minimum number of apples $A$ and then maximize total number of fruits eaten. Output $A$ and the total number of fruits eaten. ###Input: - First line contains single integer, number of test cases $T$. - Each of next $T$ lines contains only one integer $n$, number of total energy units. ###Output: For each test case print single line containing two integers, $A$ and total number of fruits eaten. ###Constraints - $1 \leq T \leq 10^5$ - $1 \leq n \leq 10^9$ ###Sample Input: 2 3 ```5``` ###Sample Output: 0 1 0 2 ###EXPLANATION: For 1st test case chef can gain all energy units without using any apples at all and eating one watermelon.
|Tags||digu_j, keteki, kpm32019|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions