Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B"You are standing on the mathit{OX} -axis at point 0 and you want to move to an integer point x > 0 . You can make several jumps. Suppose you're currently at point y ( y may be negative) and jump for the k -th time. You can: What is the minimum number of jumps you need to reach the point x ? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first and only line of each test case contains the single integer x ( 1 <= x <= 10^6 ) -- the destination point. For each test case, print the single integer -- the minimum number of jumps to reach x . It can be proved that we can reach any integer point x . In the first test case x = 1 , so you need only one jump: the 1 -st jump from 0 to 0 + 1 = 1 . In the second test case x = 2 . You need at least three jumps: Two jumps are not enough because these are the only possible variants: In the third test case, you need two jumps: the 1 -st one as +1 and the 2 -nd one as +2 , so 0 + 1 + 2 = 3 . In the fourth test case, you need three jumps: the 1 -st one as -1 , the 2 -nd one as +2 and the 3 -rd one as +3 , so 0 - 1 + 2 + 3 = 4 . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
100059040 |
Masum_Billa |
B |
Nov. 30, 2020, 5:42 p.m. |
OK |
GNU C11 |
TESTS |
8 |
15 |
0 |
|
|
100047340 |
akash456 |
B |
Nov. 30, 2020, 4:24 p.m. |
OK |
GNU C11 |
TESTS |
4 |
15 |
0 |
|
|
100057216 |
monu_17 |
B |
Nov. 30, 2020, 5:17 p.m. |
OK |
GNU C11 |
TESTS |
8 |
15 |
0 |
|
|
100057481 |
kaar07 |
B |
Nov. 30, 2020, 5:21 p.m. |
OK |
GNU C11 |
TESTS |
8 |
15 |
0 |
|
|
100082595 |
Rayvivek8810 |
B |
Dec. 1, 2020, 5:29 a.m. |
OK |
GNU C11 |
TESTS |
8 |
31 |
0 |
|
|
100061896 |
faronnok093 |
B |
Nov. 30, 2020, 6:28 p.m. |
OK |
GNU C11 |
TESTS |
8 |
31 |
0 |
|
|
100062197 |
JAHID_KARIM |
B |
Nov. 30, 2020, 6:34 p.m. |
OK |
GNU C11 |
TESTS |
8 |
31 |
0 |
|
|
100062267 |
faronnok093 |
B |
Nov. 30, 2020, 6:35 p.m. |
OK |
GNU C11 |
TESTS |
8 |
31 |
0 |
|
|
100079791 |
Oxtin |
B |
Dec. 1, 2020, 4:31 a.m. |
OK |
GNU C11 |
TESTS |
8 |
31 |
0 |
|
|
100056092 |
prakharmuley888 |
B |
Nov. 30, 2020, 5:04 p.m. |
OK |
GNU C11 |
TESTS |
4 |
46 |
0 |
|
|
100047366 |
1798338587 |
B |
Nov. 30, 2020, 4:24 p.m. |
OK |
GNU C++11 |
TESTS |
4 |
0 |
0 |
|
|
100079596 |
ROMCOM_BOY |
B |
Dec. 1, 2020, 4:27 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100076324 |
Rainer1116 |
B |
Dec. 1, 2020, 3:08 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100083204 |
Mohd__Messi |
B |
Dec. 1, 2020, 5:40 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100083168 |
NYN31 |
B |
Dec. 1, 2020, 5:40 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100082704 |
wwjnb |
B |
Dec. 1, 2020, 5:31 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100082539 |
Cleanblue |
B |
Dec. 1, 2020, 5:28 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100080458 |
oyqy1203 |
B |
Dec. 1, 2020, 4:46 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100080083 |
masud458 |
B |
Dec. 1, 2020, 4:38 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100078629 |
hassanimran114 |
B |
Dec. 1, 2020, 4:04 a.m. |
OK |
GNU C++11 |
TESTS |
8 |
15 |
0 |
|
|
100074589 |
kfg021 |
B |
Dec. 1, 2020, 2:06 a.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100084174 |
saurabh_p |
B |
Dec. 1, 2020, 5:58 a.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100079310 |
whoissmt |
B |
Dec. 1, 2020, 4:19 a.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100078378 |
shivam011 |
B |
Dec. 1, 2020, 3:57 a.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100070824 |
Paradox512 |
B |
Nov. 30, 2020, 10:44 p.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100067212 |
dwightp2 |
B |
Nov. 30, 2020, 8:20 p.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100063291 |
harsh33 |
B |
Nov. 30, 2020, 6:56 p.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100062805 |
dweebgonewild |
B |
Nov. 30, 2020, 6:46 p.m. |
OK |
GNU C++14 |
TESTS |
8 |
15 |
0 |
|
|
100055786 |
manavsinha03 |
B |
Nov. 30, 2020, 5:01 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
100055501 |
mahim_mittal |
B |
Nov. 30, 2020, 4:58 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
100065135 |
ninja21 |
B |
Nov. 30, 2020, 7:35 p.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100066566 |
archanak_ |
B |
Nov. 30, 2020, 8:05 p.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100069602 |
Belalmoawad |
B |
Nov. 30, 2020, 9:42 p.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100077782 |
momohara |
B |
Dec. 1, 2020, 3:47 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100077798 |
crystaalroo |
B |
Dec. 1, 2020, 3:47 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100079330 |
itachi12 |
B |
Dec. 1, 2020, 4:20 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100079505 |
s27 |
B |
Dec. 1, 2020, 4:24 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100079702 |
neel_007 |
B |
Dec. 1, 2020, 4:29 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100080704 |
Shailabh10989 |
B |
Dec. 1, 2020, 4:52 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100080788 |
kuchbhinahihai1344 |
B |
Dec. 1, 2020, 4:53 a.m. |
OK |
GNU C++17 |
TESTS |
8 |
15 |
0 |
|
|
100070795 |
Maryam_Oly |
B |
Nov. 30, 2020, 10:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100078446 |
neal |
B |
Dec. 1, 2020, 3:59 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100075287 |
return_47 |
B |
Dec. 1, 2020, 2:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100074228 |
pingzhi |
B |
Dec. 1, 2020, 1:49 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100072994 |
kevinyang |
B |
Dec. 1, 2020, 12:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100071027 |
MehulJ |
B |
Nov. 30, 2020, 10:58 p.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100069436 |
Diegogrc |
B |
Nov. 30, 2020, 9:34 p.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100083383 |
Gashintare |
B |
Dec. 1, 2020, 5:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100082986 |
OuDaRjA_17o3oo2 |
B |
Dec. 1, 2020, 5:36 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100080543 |
yash19_pro |
B |
Dec. 1, 2020, 4:48 a.m. |
OK |
GNU C++17 (64) |
TESTS |
8 |
15 |
0 |
|
|
100048520 |
djumanoff |
B |
Nov. 30, 2020, 4:27 p.m. |
OK |
Go |
TESTS |
4 |
389 |
5529600 |
|
|
100081153 |
dofecorces |
B |
Dec. 1, 2020, 5:01 a.m. |
OK |
Haskell |
TESTS |
8 |
31 |
102400 |
|
|
100060958 |
mphillotry |
B |
Nov. 30, 2020, 6:12 p.m. |
OK |
Java 11 |
TESTS |
8 |
155 |
0 |
|
|
100054165 |
kunalkatiyar9 |
B |
Nov. 30, 2020, 4:47 p.m. |
OK |
Java 11 |
TESTS |
4 |
156 |
0 |
|
|
100054098 |
vipin__sharma |
B |
Nov. 30, 2020, 4:46 p.m. |
OK |
Java 11 |
TESTS |
4 |
156 |
0 |
|
|
100053012 |
kp_863 |
B |
Nov. 30, 2020, 4:39 p.m. |
OK |
Java 11 |
TESTS |
4 |
156 |
0 |
|
|
100066174 |
codebook_2000 |
B |
Nov. 30, 2020, 7:56 p.m. |
OK |
Java 11 |
TESTS |
8 |
171 |
0 |
|
|
100066541 |
abdelrahman-yousf |
B |
Nov. 30, 2020, 8:04 p.m. |
OK |
Java 11 |
TESTS |
8 |
171 |
0 |
|
|
100065927 |
bittubittu |
B |
Nov. 30, 2020, 7:51 p.m. |
OK |
Java 11 |
TESTS |
8 |
171 |
0 |
|
|
100064192 |
IslamTalipovTop |
B |
Nov. 30, 2020, 7:14 p.m. |
OK |
Java 11 |
TESTS |
8 |
171 |
0 |
|
|
100059678 |
Sanju_250406 |
B |
Nov. 30, 2020, 5:51 p.m. |
OK |
Java 11 |
TESTS |
8 |
171 |
0 |
|
|
100055921 |
Codeispower |
B |
Nov. 30, 2020, 5:02 p.m. |
OK |
Java 11 |
TESTS |
4 |
171 |
0 |
|
|
100044045 |
shivamkdubey |
B |
Nov. 30, 2020, 4:16 p.m. |
OK |
Java 8 |
TESTS |
4 |
93 |
0 |
|
|
100080207 |
rachitpts.2454 |
B |
Dec. 1, 2020, 4:41 a.m. |
OK |
Java 8 |
TESTS |
8 |
108 |
0 |
|
|
100061686 |
lzhang |
B |
Nov. 30, 2020, 6:25 p.m. |
OK |
Java 8 |
TESTS |
8 |
108 |
0 |
|
|
100050393 |
Uttam007 |
B |
Nov. 30, 2020, 4:31 p.m. |
OK |
Java 8 |
TESTS |
4 |
108 |
0 |
|
|
100060152 |
Ashar2301 |
B |
Nov. 30, 2020, 5:59 p.m. |
OK |
Java 8 |
TESTS |
8 |
109 |
0 |
|
|
100056041 |
utk_100 |
B |
Nov. 30, 2020, 5:04 p.m. |
OK |
Java 8 |
TESTS |
4 |
109 |
0 |
|
|
100059984 |
PRIYANSH_TOMAR |
B |
Nov. 30, 2020, 5:56 p.m. |
OK |
Java 8 |
TESTS |
8 |
109 |
0 |
|
|
100080053 |
sumitnitesh123 |
B |
Dec. 1, 2020, 4:38 a.m. |
OK |
Java 8 |
TESTS |
8 |
109 |
0 |
|
|
100067713 |
RichardBot7000 |
B |
Nov. 30, 2020, 8:34 p.m. |
OK |
Java 8 |
TESTS |
8 |
109 |
0 |
|
|
100064697 |
less_ordinary |
B |
Nov. 30, 2020, 7:25 p.m. |
OK |
Java 8 |
TESTS |
8 |
109 |
0 |
|
|
100054717 |
Scotty_pwnz |
B |
Nov. 30, 2020, 4:51 p.m. |
OK |
Kotlin |
TESTS |
4 |
124 |
0 |
|
|
100076139 |
wuchaojie925 |
B |
Dec. 1, 2020, 3:03 a.m. |
OK |
Kotlin |
TESTS |
8 |
124 |
0 |
|
|
100057425 |
AryssonFigueiredo |
B |
Nov. 30, 2020, 5:20 p.m. |
OK |
Kotlin |
TESTS |
8 |
124 |
0 |
|
|
100050363 |
sultazat |
B |
Nov. 30, 2020, 4:31 p.m. |
OK |
Kotlin |
TESTS |
4 |
155 |
0 |
|
|
100052811 |
mubing |
B |
Nov. 30, 2020, 4:38 p.m. |
OK |
MS C++ |
TESTS |
4 |
15 |
0 |
|
|
100074320 |
forever_god |
B |
Dec. 1, 2020, 1:54 a.m. |
OK |
MS C++ |
TESTS |
8 |
30 |
0 |
|
|
100073881 |
air_2 |
B |
Dec. 1, 2020, 1:33 a.m. |
OK |
MS C++ |
TESTS |
8 |
31 |
0 |
|
|
100052464 |
pypyzjj |
B |
Nov. 30, 2020, 4:36 p.m. |
OK |
MS C++ |
TESTS |
4 |
31 |
0 |
|
|
100045142 |
thomasliu |
B |
Nov. 30, 2020, 4:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
30 |
0 |
|
|
100060723 |
oneskovic |
B |
Nov. 30, 2020, 6:08 p.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
30 |
0 |
|
|
100045857 |
wuwu |
B |
Nov. 30, 2020, 4:20 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
30 |
0 |
|
|
100044689 |
ylwnbnbnb |
B |
Nov. 30, 2020, 4:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
30 |
0 |
|
|
100060395 |
SlowiHex |
B |
Nov. 30, 2020, 6:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
31 |
0 |
|
|
100079532 |
Torehalt |
B |
Dec. 1, 2020, 4:25 a.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
31 |
0 |
|
|
100078055 |
krishnayadav1 |
B |
Dec. 1, 2020, 3:52 a.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
31 |
0 |
|
|
100068865 |
tawfekhesham |
B |
Nov. 30, 2020, 9:11 p.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
31 |
0 |
|
|
100060503 |
SlowiHex |
B |
Nov. 30, 2020, 6:05 p.m. |
OK |
MS C++ 2017 |
TESTS |
8 |
31 |
0 |
|
|
100054694 |
gaserashraf |
B |
Nov. 30, 2020, 4:51 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
31 |
0 |
|
|
100064660 |
tomvai15 |
B |
Nov. 30, 2020, 7:24 p.m. |
OK |
.NET Core C# |
TESTS |
8 |
93 |
0 |
|
|
100045193 |
watarimaycry2 |
B |
Nov. 30, 2020, 4:19 p.m. |
OK |
Node.js |
TESTS |
4 |
77 |
409600 |
|
|
100058312 |
explorer_sifat |
B |
Nov. 30, 2020, 5:32 p.m. |
OK |
Node.js |
TESTS |
8 |
78 |
1638400 |
|
|
100058271 |
henrychenOutlook |
B |
Nov. 30, 2020, 5:31 p.m. |
OK |
Node.js |
TESTS |
8 |
109 |
1638400 |
|
|
100077100 |
18211a04p1 |
B |
Dec. 1, 2020, 3:29 a.m. |
OK |
PyPy 3 |
TESTS |
8 |
139 |
1433600 |
|
|
100076988 |
saibharath945 |
B |
Dec. 1, 2020, 3:26 a.m. |
OK |
PyPy 3 |
TESTS |
8 |
139 |
1433600 |
|
|
100062705 |
fazle_rabbi_ferdaus |
B |
Nov. 30, 2020, 6:44 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
140 |
1843200 |
|
|
100062194 |
bpavan122 |
B |
Nov. 30, 2020, 6:34 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
140 |
1843200 |
|
|
100083616 |
akifpathan |
B |
Dec. 1, 2020, 5:48 a.m. |
OK |
PyPy 3 |
TESTS |
8 |
140 |
1945600 |
|
|
100062833 |
apurva3455 |
B |
Nov. 30, 2020, 6:47 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
155 |
1843200 |
|
|
100058489 |
reddevil100 |
B |
Nov. 30, 2020, 5:34 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
155 |
1843200 |
|
|
100054486 |
upadhyay.aaditya2001 |
B |
Nov. 30, 2020, 4:49 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
155 |
1843200 |
|
|
100050081 |
swoon |
B |
Nov. 30, 2020, 4:31 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
155 |
1945600 |
|
|
100045309 |
knight2995 |
B |
Nov. 30, 2020, 4:19 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
155 |
1945600 |
|
|
100074693 |
biltharesatyendra |
B |
Dec. 1, 2020, 2:11 a.m. |
OK |
Python 2 |
TESTS |
8 |
373 |
0 |
|
|
100056936 |
arvas123 |
B |
Nov. 30, 2020, 5:14 p.m. |
OK |
Python 3 |
TESTS |
8 |
93 |
0 |
|
|
100057212 |
Rayvivek8810 |
B |
Nov. 30, 2020, 5:17 p.m. |
OK |
Python 3 |
TESTS |
8 |
108 |
0 |
|
|
100058225 |
swagsysecond |
B |
Nov. 30, 2020, 5:31 p.m. |
OK |
Python 3 |
TESTS |
8 |
109 |
307200 |
|
|
100056188 |
nareshsaharan2016 |
B |
Nov. 30, 2020, 5:05 p.m. |
OK |
Python 3 |
TESTS |
4 |
109 |
307200 |
|
|
100052516 |
eugalt |
B |
Nov. 30, 2020, 4:36 p.m. |
OK |
Python 3 |
TESTS |
4 |
109 |
307200 |
|
|
100045638 |
blazersnake |
B |
Nov. 30, 2020, 4:20 p.m. |
OK |
Python 3 |
TESTS |
4 |
124 |
0 |
|
|
100050685 |
Gosunov |
B |
Nov. 30, 2020, 4:32 p.m. |
OK |
Python 3 |
TESTS |
4 |
124 |
307200 |
|
|
100054242 |
akt17 |
B |
Nov. 30, 2020, 4:47 p.m. |
OK |
Python 3 |
TESTS |
4 |
140 |
409600 |
|
|
100071079 |
PratyaydeepG |
B |
Nov. 30, 2020, 11:01 p.m. |
OK |
Python 3 |
TESTS |
8 |
155 |
4096000 |
|
|
100054234 |
Sharp_Eye |
B |
Nov. 30, 2020, 4:47 p.m. |
OK |
Python 3 |
TESTS |
4 |
170 |
307200 |
|
|
100077064 |
Slsvcn |
B |
Dec. 1, 2020, 3:28 a.m. |
OK |
Rust |
TESTS |
8 |
46 |
0 |
|
|
remove filters
Back to search problems