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 Setter:

Animesh Khashkel

Please login to submit solution to this problem.

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

Problem Stats

209/584

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
05 sadia2427 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
11 smriad 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
36 ashadullah_arif Cpp 0.01s
37 abdulmukit Cpp 0.01s
38 Riaz_BSMRSTU Cpp 0.01s
39 10102020 Cpp 0.01s
40 Rakib05 Cpp 0.01s
41 pulak_ict_mbstu Cpp14 0.01s
42 ismail_cse15 Cpp14 0.01s
43 Chayti_Saha98 Cpp14 0.01s
44 Shammo Cpp14 0.01s
45 joymollick Cpp14 0.01s
46 ammasum Cpp14 0.01s
47 anik_JU Cpp14 0.01s
48 Nazmul_WUB Cpp14 0.01s
49 rayhan50001 Cpp14 0.01s
50 masba Python 0.03s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support