# 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

# 212/593

Solve/Submission

### Ranking

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