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"Theofanis really likes sequences of positive integers, thus his teacher (Yeltsa Kcir) gave him a problem about a sequence that consists of only special numbers. Let's call a positive number special if it can be written as a sum of different non-negative powers of n . For example, for n = 4 number 17 is special, because it can be written as 4^0 + 4^2 = 1 + 16 = 17 , but 9 is not. Theofanis asks you to help him find the k -th special number if they are sorted in increasing order. Since this number may be too large, output it modulo 10^9+7 . The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first and only line of each test case contains two integers n and k ( 2 <= n <= 10^9 ; 1 <= k <= 10^9 ). For each test case, print one integer -- the k -th special number in increasing order modulo 10^9+7 . For n = 3 the sequence is [1,3,4,9...] "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
131274420 |
Mrgglock |
B |
Oct. 9, 2021, 5:47 a.m. |
OK |
GNU C11 |
TESTS |
12 |
31 |
3686400 |
|
1100 |
131259605 |
BugLeave |
B |
Oct. 9, 2021, 2:15 a.m. |
OK |
GNU C11 |
TESTS |
12 |
61 |
3686400 |
|
1100 |
131274054 |
milan_s1 |
B |
Oct. 9, 2021, 5:43 a.m. |
OK |
GNU C11 |
TESTS |
12 |
62 |
3686400 |
|
1100 |
131256904 |
BadCodeBuilder |
B |
Oct. 9, 2021, 2 a.m. |
OK |
GNU C11 |
TESTS |
12 |
77 |
3686400 |
|
1100 |
131249210 |
yakkanox |
B |
Oct. 8, 2021, 10:07 p.m. |
OK |
GNU C11 |
TESTS |
12 |
78 |
3686400 |
|
1100 |
131226799 |
190030927 |
B |
Oct. 8, 2021, 5:09 p.m. |
OK |
GNU C11 |
TESTS |
12 |
78 |
3686400 |
|
1100 |
131263373 |
shashwat_nayak |
B |
Oct. 9, 2021, 2:58 a.m. |
OK |
GNU C11 |
TESTS |
12 |
93 |
3686400 |
|
1100 |
131252381 |
xiaoziyao |
B |
Oct. 9, 2021, 12:18 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
1100 |
131255806 |
gvihvo |
B |
Oct. 9, 2021, 1:54 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
3788800 |
|
1100 |
131239153 |
Mohd_Faisal |
B |
Oct. 8, 2021, 6:51 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131253311 |
Chameleon216 |
B |
Oct. 9, 2021, 12:48 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131262441 |
anandjaiswal |
B |
Oct. 9, 2021, 2:41 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131262982 |
Originator-kumma |
B |
Oct. 9, 2021, 2:51 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131267100 |
dfoi_cly |
B |
Oct. 9, 2021, 4:07 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131269887 |
panther_245 |
B |
Oct. 9, 2021, 4:49 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131263466 |
zxzxzxd |
B |
Oct. 9, 2021, 3 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131264506 |
luogu_bot4 |
B |
Oct. 9, 2021, 3:18 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131255840 |
HomuraCN |
B |
Oct. 9, 2021, 1:54 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
3686400 |
|
1100 |
131227563 |
chiragsharma0505 |
B |
Oct. 8, 2021, 5:11 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
3788800 |
|
1100 |
131241258 |
harsh_29102 |
B |
Oct. 8, 2021, 7:21 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
3788800 |
|
1100 |
131235629 |
Astha_singhal |
B |
Oct. 8, 2021, 6:17 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
3788800 |
|
1100 |
131244235 |
SajibKC_19 |
B |
Oct. 8, 2021, 8:08 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131242559 |
DavidLescano |
B |
Oct. 8, 2021, 7:41 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3686400 |
|
1100 |
131273866 |
cvt_RANA |
B |
Oct. 9, 2021, 5:41 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131274032 |
Ichigo1705 |
B |
Oct. 9, 2021, 5:43 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131272174 |
Sfurvdio_Iesgdkw_Rwen |
B |
Oct. 9, 2021, 5:21 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131273386 |
yosyed |
B |
Oct. 9, 2021, 5:36 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
30 |
3788800 |
|
1100 |
131242219 |
prottoyfuad |
B |
Oct. 8, 2021, 7:36 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131271525 |
Oliax |
B |
Oct. 9, 2021, 5:13 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131266047 |
pr_iy_an_sh_ut_iw_ar_i |
B |
Oct. 9, 2021, 3:48 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131264053 |
Suvodeep07May |
B |
Oct. 9, 2021, 3:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131253510 |
ArijitGD |
B |
Oct. 9, 2021, 12:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131252102 |
augg1e |
B |
Oct. 9, 2021, 12:08 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131251641 |
silxi |
B |
Oct. 8, 2021, 11:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131244770 |
udai_saini |
B |
Oct. 8, 2021, 8:17 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131244149 |
Siddhu_123 |
B |
Oct. 8, 2021, 8:07 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131242283 |
FriendToDino |
B |
Oct. 8, 2021, 7:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
4300800 |
|
1100 |
131252633 |
huangxuepeng |
B |
Oct. 9, 2021, 12:26 a.m. |
OK |
Go |
TESTS |
12 |
716 |
10649600 |
|
1100 |
131263742 |
DedsecKnight |
B |
Oct. 9, 2021, 3:05 a.m. |
OK |
Java 11 |
TESTS |
12 |
217 |
24166400 |
|
1100 |
131264531 |
smodak2000 |
B |
Oct. 9, 2021, 3:19 a.m. |
OK |
Java 11 |
TESTS |
12 |
218 |
23859200 |
|
1100 |
131262419 |
henrychenOutlook |
B |
Oct. 9, 2021, 2:40 a.m. |
OK |
Java 11 |
TESTS |
12 |
218 |
23859200 |
|
1100 |
131245295 |
Toinfinity |
B |
Oct. 8, 2021, 8:28 p.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23756800 |
|
1100 |
131266125 |
BiggEr. |
B |
Oct. 9, 2021, 3:49 a.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23756800 |
|
1100 |
131225791 |
Avatar |
B |
Oct. 8, 2021, 5:06 p.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23859200 |
|
1100 |
131227880 |
Hemose |
B |
Oct. 8, 2021, 5:12 p.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23859200 |
|
1100 |
131239479 |
insane_banda |
B |
Oct. 8, 2021, 6:55 p.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23961600 |
|
1100 |
131234559 |
aggkritika080700 |
B |
Oct. 8, 2021, 6:08 p.m. |
OK |
Java 11 |
TESTS |
12 |
233 |
23961600 |
|
1100 |
131273822 |
the_unseen |
B |
Oct. 9, 2021, 5:41 a.m. |
OK |
Java 11 |
TESTS |
12 |
249 |
23859200 |
|
1100 |
131247804 |
SpargelTarzan |
B |
Oct. 8, 2021, 9:25 p.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
20480000 |
|
1100 |
131235583 |
gssakash |
B |
Oct. 8, 2021, 6:17 p.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
20480000 |
|
1100 |
131269551 |
aashay_03 |
B |
Oct. 9, 2021, 4:44 a.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
20480000 |
|
1100 |
131248383 |
altik_nik |
B |
Oct. 8, 2021, 9:41 p.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
20480000 |
|
1100 |
131248250 |
ramuked |
B |
Oct. 8, 2021, 9:37 p.m. |
OK |
Java 8 |
TESTS |
12 |
140 |
20480000 |
|
1100 |
131234565 |
Keyur21 |
B |
Oct. 8, 2021, 6:08 p.m. |
OK |
Java 8 |
TESTS |
12 |
155 |
20480000 |
|
1100 |
131235824 |
gssakash |
B |
Oct. 8, 2021, 6:19 p.m. |
OK |
Java 8 |
TESTS |
12 |
155 |
20480000 |
|
1100 |
131233180 |
RonWonWon |
B |
Oct. 8, 2021, 5:59 p.m. |
OK |
Java 8 |
TESTS |
12 |
155 |
20480000 |
|
1100 |
131240794 |
tishrah_ |
B |
Oct. 8, 2021, 7:13 p.m. |
OK |
Java 8 |
TESTS |
12 |
171 |
20480000 |
|
1100 |
131270110 |
Piyushnagpal80 |
B |
Oct. 9, 2021, 4:52 a.m. |
OK |
Java 8 |
TESTS |
12 |
171 |
20480000 |
|
1100 |
131241138 |
mishgan |
B |
Oct. 8, 2021, 7:19 p.m. |
OK |
Kotlin 1.4 |
TESTS |
12 |
218 |
21811200 |
|
1100 |
131242812 |
huy.caohuyhuy123 |
B |
Oct. 8, 2021, 7:45 p.m. |
OK |
Kotlin 1.5 |
TESTS |
12 |
311 |
25804800 |
|
1100 |
131245442 |
paulmis |
B |
Oct. 8, 2021, 8:30 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
46 |
3686400 |
|
1100 |
131253706 |
Claude1 |
B |
Oct. 9, 2021, 1 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
77 |
3788800 |
|
1100 |
131230048 |
KimSP |
B |
Oct. 8, 2021, 5:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
78 |
3788800 |
|
1100 |
131269634 |
Rivennnnnnnnn |
B |
Oct. 9, 2021, 4:45 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
92 |
3788800 |
|
1100 |
131229266 |
iwbtllhy |
B |
Oct. 8, 2021, 5:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
93 |
3788800 |
|
1100 |
131254638 |
x_silter |
B |
Oct. 9, 2021, 1:25 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
108 |
3788800 |
|
1100 |
131229322 |
BarebuhPuh |
B |
Oct. 8, 2021, 5:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
124 |
3788800 |
|
1100 |
131231252 |
WUT_ZJL |
B |
Oct. 8, 2021, 5:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
124 |
4198400 |
|
1100 |
131239210 |
tabibi |
B |
Oct. 8, 2021, 6:51 p.m. |
OK |
.NET Core C# |
TESTS |
12 |
171 |
14540800 |
|
1100 |
131275401 |
phantomxxx |
B |
Oct. 9, 2021, 5:57 a.m. |
OK |
PyPy 3 |
TESTS |
12 |
140 |
23244800 |
|
1100 |
131248551 |
Het_Fadia |
B |
Oct. 8, 2021, 9:46 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
140 |
23449600 |
|
1100 |
131239751 |
n00bc0d3r69 |
B |
Oct. 8, 2021, 6:59 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
155 |
23961600 |
|
1100 |
131248533 |
Het_Fadia |
B |
Oct. 8, 2021, 9:46 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
170 |
24166400 |
|
1100 |
131248503 |
Het_Fadia |
B |
Oct. 8, 2021, 9:45 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
171 |
24064000 |
|
1100 |
131248473 |
Het_Fadia |
B |
Oct. 8, 2021, 9:44 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
171 |
24166400 |
|
1100 |
131245237 |
lebron87 |
B |
Oct. 8, 2021, 8:27 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
202 |
26419200 |
|
1100 |
131239309 |
jano31415 |
B |
Oct. 8, 2021, 6:53 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
233 |
28876800 |
|
1100 |
131253099 |
llllllll |
B |
Oct. 9, 2021, 12:42 a.m. |
OK |
PyPy 3 |
TESTS |
12 |
249 |
29798400 |
|
1100 |
131249812 |
freakbuoyancy |
B |
Oct. 8, 2021, 10:30 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
264 |
24371200 |
|
1100 |
131247382 |
mathturbator |
B |
Oct. 8, 2021, 9:14 p.m. |
OK |
Python 2 |
TESTS |
12 |
436 |
6553600 |
|
1100 |
131240547 |
D_Dima |
B |
Oct. 8, 2021, 7:10 p.m. |
OK |
Python 3 |
TESTS |
12 |
264 |
6758400 |
|
1100 |
131244085 |
eugalt |
B |
Oct. 8, 2021, 8:05 p.m. |
OK |
Python 3 |
TESTS |
12 |
264 |
7372800 |
|
1100 |
131261951 |
VioletVal |
B |
Oct. 9, 2021, 2:30 a.m. |
OK |
Python 3 |
TESTS |
12 |
280 |
6758400 |
|
1100 |
131269278 |
aman2000jaiswal14 |
B |
Oct. 9, 2021, 4:40 a.m. |
OK |
Python 3 |
TESTS |
12 |
280 |
7680000 |
|
1100 |
131272751 |
stormzy_432 |
B |
Oct. 9, 2021, 5:28 a.m. |
OK |
Python 3 |
TESTS |
12 |
311 |
6963200 |
|
1100 |
131262755 |
shashankbarole410 |
B |
Oct. 9, 2021, 2:47 a.m. |
OK |
Python 3 |
TESTS |
12 |
311 |
6963200 |
|
1100 |
131250111 |
.Machine |
B |
Oct. 8, 2021, 10:41 p.m. |
OK |
Python 3 |
TESTS |
12 |
311 |
6963200 |
|
1100 |
131228273 |
AnMa_jerry |
B |
Oct. 8, 2021, 5:13 p.m. |
OK |
Python 3 |
TESTS |
12 |
311 |
6963200 |
|
1100 |
131225835 |
tieros |
B |
Oct. 8, 2021, 5:06 p.m. |
OK |
Python 3 |
TESTS |
12 |
327 |
7782400 |
|
1100 |
131274190 |
rishahsir |
B |
Oct. 9, 2021, 5:44 a.m. |
OK |
Python 3 |
TESTS |
12 |
342 |
6758400 |
|
1100 |
131246906 |
IvanDyachenko |
B |
Oct. 8, 2021, 9:03 p.m. |
OK |
Scala |
TESTS |
12 |
498 |
31539200 |
|
1100 |
remove filters
Back to search problems