# DCP-111: Chocolates Back to All Problems

Easy Math > Basic Math

Your father give you n chocholates.you go to the school and you will now play with this chocolates........... you decorate them in a good way like below c c c c c c c c c c c c c c c c c c c c c Now you have to calculate the number of lines **l** formed by your chocolates.if you cant complete a line then that line will be removed and eat the remaining chocolates. Input: ------ The first line of input will be an integer **t** number of test case. next **t** lines contain an integer **N** the number of chocolates. Output: ------- Print the number of lines **l** on the first line and then the number of chocolates you eat on the next line. Constrains --------- 1<=t<=100 1<=N<=10^18 Sample Input ------------ 2 10 22 Sample Output ------------- 4 0 6 1

### Problem Limits

 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

# 205/575

Solve/Submission

### Ranking

# User Language Timing
01 ash12 Cpp14 0.00s
02 MAHRahat Cpp14 0.00s
03 emrul Cpp14 0.00s
04 tariqiitju Cpp14 0.00s
05 sazal_dev Cpp14 0.00s
06 deder Cpp14 0.00s
07 Logic_Hunter Cpp14 0.00s
08 mohibur Cpp 0.00s
09 afzalul Cpp14 0.00s
10 giash_uddin Cpp14 0.00s
11 onucsecu Cpp14 0.00s
12 feodorv C 0.00s
13 kpretomazi Cpp 0.00s
14 Mr_KAJOL Cpp14 0.00s
15 Ansarul_14 Cpp14 0.00s
16 JubayerSohel Cpp14 0.00s
17 seyedssz Cpp14 0.00s
18 jualahmed Cpp14 0.00s
20 SakibAlamin Cpp14 0.00s
21 HM39 Cpp14 0.00s
22 _dipu Cpp14 0.00s
24 hmtanbir Cpp14 0.00s
25 mahmud2690 Cpp 0.00s
26 waqqas Cpp 0.00s
27 Morass Cpp14 0.00s
28 mash02 Cpp 0.00s
29 nafischonchol C 0.00s
30 Riaz_BSMRSTU Cpp 0.01s
31 R_coder Cpp 0.01s
32 10102020 Cpp 0.01s
34 rabbicse C 0.01s
35 joymollick Cpp14 0.01s
36 mamun02inf Cpp 0.01s
37 ismail_cse15 Cpp14 0.01s
38 abdulmukit Cpp 0.01s
39 Rakib05 Cpp 0.01s
40 ammasum Cpp14 0.01s
41 Ruhul1975 Cpp 0.01s
42 Chayti_Saha98 Cpp14 0.01s
43 anik_JU Cpp14 0.01s
44 pulak_ict_mbstu Cpp14 0.01s
45 rayhan50001 Cpp14 0.01s
46 Shammo Cpp14 0.01s
47 Nazmul_WUB Cpp14 0.01s
48 rockersabbir CSharp 0.03s
49 masba Python 0.03s