DCP-74: Mobile Key Back to All Problems

Please look in the following sequence: 1 2 3 4 5 6 7 8 9 Let, its our normal Mobile numeric Key pattern. in 1st line consists 1 2 3, in 2nd line 4 5 6.... if we change this pattern as : 1 2 3 6 5 4 7 8 9 12 11 10 13 14 15 and so on... and increase those number upto 10^18, what will be nth line? here 5th line is 13 14 15. Input: ------ The first line of the input gives the number of test cases, T(1>=T<=10^5). T test cases follow. Each consists of one line with a Single Positive number N(1>=N<=10^18) . Output: ------- For each test case, output one line containing Case #x: n1 n2 n3 where x is the test case number (starting from 1) and n1, n2, n3 is the 1st , 2nd and 3rd number of Nth line. See sample input output for more clarification. Sample Input ------------ 3 2 3 5 Sample Output ------------- Case #1: 6 5 4 Case #2: 7 8 9 Case #3: 13 14 15

Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 3.00 Go 3.00 Java 3.00 JavaScript 3.00 Objective-C 3.00 Perl 3.00 PHP 3.00 Python 3.00 Python3 3.00 Ruby 3.00 VB.Net 3.00

323/668

Solve/Submission

Ranking

# User Language Timing
01 rezaul_karim Cpp14 0.05s
02 nazmul_bzs Cpp14 0.05s
03 Masum_ice Cpp14 0.05s
04 Mr_KAJOL Cpp14 0.05s
05 soumitro_cse1604114 Cpp14 0.05s
06 afzalul Cpp14 0.05s
07 Rifat121 Cpp14 0.05s
09 Robbinb1993 Cpp 0.05s
10 Bhuiyan C 0.05s
11 leenaiitju Cpp14 0.06s
12 wayne6172 Cpp 0.06s
13 Azizul_cse27 Cpp 0.06s
14 souravahmed C 0.06s
15 tanjilaorpe C 0.06s
16 sajib_kumar_biswas C 0.06s
17 Nasif_44th C 0.06s
18 neel71 C 0.06s
19 rabbicse Cpp 0.06s
20 ErrorICE Cpp 0.06s
21 Sabiha_1604070 C 0.06s
22 Utshas Cpp 0.06s
23 Antor_Sarker_Sabuj Cpp 0.06s
24 _JaHid_ C 0.06s
25 Sakif_1604124 Cpp 0.06s
26 Mushfiq1604123 Cpp 0.06s
27 sumaiya710 C 0.06s
28 Morass Cpp14 0.06s
29 abdulmukit Cpp 0.06s
30 feodorv C 0.06s
31 cinmoy98 Cpp14 0.06s
32 1604099_ishtiaq Cpp14 0.06s
33 ashish_pondit Cpp14 0.06s
34 opu1604073 Cpp14 0.06s
35 Alamgir_1604069 Cpp14 0.06s
36 shifat1604112 Cpp14 0.06s
37 non_coder Cpp14 0.06s
38 Sudipta_Nath Cpp14 0.06s
39 maruf089 C 0.06s
40 DynamicOvi Cpp 0.06s
41 upol_vai Cpp14 0.06s
42 Foysal_36 Cpp14 0.06s
43 rabiulrafi01 Cpp14 0.06s
45 anik_JU Cpp14 0.06s
46 Koushik54 Cpp14 0.06s
47 return_SS Cpp14 0.06s
48 marineCoder Cpp14 0.06s
49 Eucalyptus Cpp14 0.06s
50 Nurul_CSE Cpp14 0.06s
Feedback