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"Let's define a function f(x) ( x is a positive integer) as follows: write all digits of the decimal representation of x backwards, then get rid of the leading zeroes. For example, f(321) = 123 , f(120) = 21 , f(1000000) = 1 , f(111) = 111 . Let's define another function g(x) = dfrac{x}{f(f(x))} ( x is a positive integer as well). Your task is the following: for the given positive integer n , calculate the number of different values of g(x) among all numbers x such that 1 <= x <= n . The first line contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Each test case consists of one line containing one integer n ( 1 <= n < 10^{100} ). This integer is given without leading zeroes. For each test case, print one integer -- the number of different values of the function g(x) , if x can be any integer from [1, n] . Explanations for the two first test cases of the example: "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
100073245 |
ManateeFan |
A |
Dec. 1, 2020, 1:05 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
16 |
46 |
1024000 |
|
|
100055393 |
hacky3244 |
A |
Nov. 30, 2020, 4:57 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
2 |
46 |
1126400 |
|
|
100046062 |
PeterWinchester |
A |
Nov. 30, 2020, 4:21 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
100049268 |
Virus168 |
A |
Nov. 30, 2020, 4:29 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
100050864 |
harshitgoel1584 |
A |
Nov. 30, 2020, 4:32 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
100064024 |
manish_1605 |
A |
Nov. 30, 2020, 7:10 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
100068470 |
Aurora-AF |
A |
Nov. 30, 2020, 8:57 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
100080311 |
aditta_saikat |
A |
Dec. 1, 2020, 4:43 a.m. |
OK |
GNU C11 |
TESTS |
16 |
15 |
0 |
|
|
100052956 |
Zinnat_18 |
A |
Nov. 30, 2020, 4:38 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
100043440 |
farzana.tur |
A |
Nov. 30, 2020, 4:14 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
100059974 |
JAHID_KARIM |
A |
Nov. 30, 2020, 5:56 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
102400 |
|
|
100068384 |
Aurora-AF |
A |
Nov. 30, 2020, 8:54 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
102400 |
|
|
100075910 |
20192122 |
A |
Dec. 1, 2020, 2:57 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100084036 |
Mohd__Messi |
A |
Dec. 1, 2020, 5:56 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100082831 |
wfly1998 |
A |
Dec. 1, 2020, 5:33 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100082734 |
Rishabh_Abhishek |
A |
Dec. 1, 2020, 5:32 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100082392 |
wwjnb |
A |
Dec. 1, 2020, 5:25 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100082059 |
Fire_ass |
A |
Dec. 1, 2020, 5:19 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100078854 |
kevinwinatamichael |
A |
Dec. 1, 2020, 4:09 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100076935 |
weishenmezheyangzi |
A |
Dec. 1, 2020, 3:25 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100076300 |
Sugewud |
A |
Dec. 1, 2020, 3:08 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100076024 |
Mariam_Yasser |
A |
Dec. 1, 2020, 3 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
15 |
0 |
|
|
100055379 |
Astronomax |
A |
Nov. 30, 2020, 4:57 p.m. |
OK |
GNU C++14 |
TESTS |
2 |
0 |
0 |
|
|
100056122 |
anurag_.gupta |
A |
Nov. 30, 2020, 5:05 p.m. |
OK |
GNU C++14 |
TESTS |
2 |
0 |
0 |
|
|
100054555 |
allFiredUp |
A |
Nov. 30, 2020, 4:49 p.m. |
OK |
GNU C++14 |
TESTS |
2 |
0 |
3993600 |
|
|
100068794 |
samiunniloy |
A |
Nov. 30, 2020, 9:09 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100065547 |
ishan_sharma |
A |
Nov. 30, 2020, 7:44 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100066173 |
PavelChadnov |
A |
Nov. 30, 2020, 7:56 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100066897 |
akshit1744 |
A |
Nov. 30, 2020, 8:12 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100062367 |
Unsolved_Inhuman |
A |
Nov. 30, 2020, 6:37 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100063187 |
ProAbdo |
A |
Nov. 30, 2020, 6:54 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100064570 |
vasiljevic3 |
A |
Nov. 30, 2020, 7:22 p.m. |
OK |
GNU C++14 |
TESTS |
5 |
15 |
0 |
|
|
100055322 |
Ahmed_Allawati |
A |
Nov. 30, 2020, 4:56 p.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
100049645 |
ShaswatAnand |
A |
Nov. 30, 2020, 4:30 p.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
100054540 |
TanjiRaj |
A |
Nov. 30, 2020, 4:49 p.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
100055550 |
WeReign |
A |
Nov. 30, 2020, 4:58 p.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
100054649 |
akshitdhoundiyal |
A |
Nov. 30, 2020, 4:50 p.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
409600 |
|
|
100071002 |
kaede2020 |
A |
Nov. 30, 2020, 10:56 p.m. |
OK |
GNU C++17 |
TESTS |
16 |
15 |
0 |
|
|
100079982 |
apupneja2002 |
A |
Dec. 1, 2020, 4:36 a.m. |
OK |
GNU C++17 |
TESTS |
16 |
15 |
0 |
|
|
100077097 |
__DESTROYER__ |
A |
Dec. 1, 2020, 3:29 a.m. |
OK |
GNU C++17 |
TESTS |
16 |
15 |
0 |
|
|
100075464 |
AdnanIslam840798 |
A |
Dec. 1, 2020, 2:43 a.m. |
OK |
GNU C++17 |
TESTS |
16 |
15 |
0 |
|
|
100069211 |
rmssajjad |
A |
Nov. 30, 2020, 9:25 p.m. |
OK |
GNU C++17 |
TESTS |
5 |
15 |
0 |
|
|
100043744 |
nadimnesar |
A |
Nov. 30, 2020, 4:15 p.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
100048455 |
just_javed |
A |
Nov. 30, 2020, 4:27 p.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
100052596 |
roastedcoder |
A |
Nov. 30, 2020, 4:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
100081588 |
marcos_999 |
A |
Dec. 1, 2020, 5:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
16 |
15 |
0 |
|
|
100084066 |
NKT.Hieu.RiinK |
A |
Dec. 1, 2020, 5:56 a.m. |
OK |
GNU C++17 (64) |
TESTS |
16 |
15 |
0 |
|
|
100080029 |
moraprex |
A |
Dec. 1, 2020, 4:37 a.m. |
OK |
GNU C++17 (64) |
TESTS |
16 |
15 |
0 |
|
|
100074876 |
AMO5 |
A |
Dec. 1, 2020, 2:21 a.m. |
OK |
GNU C++17 (64) |
TESTS |
16 |
15 |
0 |
|
|
100072208 |
19992147 |
A |
Dec. 1, 2020, 12:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
16 |
15 |
0 |
|
|
100069548 |
babyelephant |
A |
Nov. 30, 2020, 9:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
15 |
0 |
|
|
100069540 |
dysyn1314 |
A |
Nov. 30, 2020, 9:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
15 |
0 |
|
|
100082391 |
Teach-tp |
A |
Dec. 1, 2020, 5:25 a.m. |
OK |
Go |
TESTS |
16 |
31 |
102400 |
|
|
100058658 |
codebook_2000 |
A |
Nov. 30, 2020, 5:36 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
100069001 |
L_MESSI_10 |
A |
Nov. 30, 2020, 9:17 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
100063826 |
zenilharia26 |
A |
Nov. 30, 2020, 7:06 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
100063735 |
sam_code |
A |
Nov. 30, 2020, 7:04 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
100060757 |
gssakash |
A |
Nov. 30, 2020, 6:09 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
100055061 |
soumitri12 |
A |
Nov. 30, 2020, 4:54 p.m. |
OK |
Java 11 |
TESTS |
2 |
155 |
0 |
|
|
100054945 |
nietzschewalrus779 |
A |
Nov. 30, 2020, 4:53 p.m. |
OK |
Java 11 |
TESTS |
2 |
170 |
0 |
|
|
100069013 |
L_MESSI_10 |
A |
Nov. 30, 2020, 9:17 p.m. |
OK |
Java 11 |
TESTS |
5 |
170 |
0 |
|
|
100056970 |
stormovik |
A |
Nov. 30, 2020, 5:15 p.m. |
OK |
Java 11 |
TESTS |
5 |
170 |
0 |
|
|
100054710 |
sanidhya_02 |
A |
Nov. 30, 2020, 4:51 p.m. |
OK |
Java 11 |
TESTS |
2 |
170 |
0 |
|
|
100059394 |
kbadrinath |
A |
Nov. 30, 2020, 5:47 p.m. |
OK |
Java 8 |
TESTS |
5 |
78 |
0 |
|
|
100061950 |
less_ordinary |
A |
Nov. 30, 2020, 6:29 p.m. |
OK |
Java 8 |
TESTS |
5 |
92 |
0 |
|
|
100060024 |
yatharthgullu |
A |
Nov. 30, 2020, 5:57 p.m. |
OK |
Java 8 |
TESTS |
5 |
92 |
0 |
|
|
100052576 |
mr_coder1 |
A |
Nov. 30, 2020, 4:37 p.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
0 |
|
|
100058375 |
Shagoto |
A |
Nov. 30, 2020, 5:33 p.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
100056212 |
aviraltrivedi |
A |
Nov. 30, 2020, 5:06 p.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
0 |
|
|
100055444 |
paragpallav |
A |
Nov. 30, 2020, 4:57 p.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
0 |
|
|
100052496 |
moli2398 |
A |
Nov. 30, 2020, 4:36 p.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
0 |
|
|
100080881 |
prasoon006 |
A |
Dec. 1, 2020, 4:55 a.m. |
OK |
Java 8 |
TESTS |
16 |
108 |
0 |
|
|
100080304 |
flyman3046 |
A |
Dec. 1, 2020, 4:43 a.m. |
OK |
Java 8 |
TESTS |
16 |
108 |
0 |
|
|
100052693 |
AryssonFigueiredo |
A |
Nov. 30, 2020, 4:37 p.m. |
OK |
Kotlin |
TESTS |
2 |
77 |
0 |
|
|
100074867 |
wuchaojie925 |
A |
Dec. 1, 2020, 2:21 a.m. |
OK |
Kotlin |
TESTS |
16 |
124 |
0 |
|
|
100059272 |
TRR |
A |
Nov. 30, 2020, 5:46 p.m. |
OK |
Mono C# |
TESTS |
5 |
62 |
0 |
|
|
100046743 |
zobayerhossain |
A |
Nov. 30, 2020, 4:23 p.m. |
OK |
MS C++ |
TESTS |
2 |
30 |
0 |
|
|
100069458 |
YTICpoch |
A |
Nov. 30, 2020, 9:35 p.m. |
OK |
MS C++ |
TESTS |
5 |
31 |
0 |
|
|
100080559 |
Keenan2114 |
A |
Dec. 1, 2020, 4:49 a.m. |
OK |
MS C++ |
TESTS |
16 |
31 |
0 |
|
|
100080868 |
Keenan2114 |
A |
Dec. 1, 2020, 4:54 a.m. |
OK |
MS C++ |
TESTS |
16 |
31 |
0 |
|
|
100080792 |
Keenan2114 |
A |
Dec. 1, 2020, 4:53 a.m. |
OK |
MS C++ |
TESTS |
16 |
31 |
0 |
|
|
100072960 |
air_2 |
A |
Dec. 1, 2020, 12:53 a.m. |
OK |
MS C++ |
TESTS |
16 |
31 |
0 |
|
|
100055592 |
201901432 |
A |
Nov. 30, 2020, 4:59 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
0 |
0 |
|
|
100064336 |
Ky6_ |
A |
Nov. 30, 2020, 7:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
100052856 |
ustaritz |
A |
Nov. 30, 2020, 4:38 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
100048485 |
pastey |
A |
Nov. 30, 2020, 4:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
100062452 |
stevenning.203 |
A |
Nov. 30, 2020, 6:38 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
31 |
0 |
|
|
100072257 |
EvgeniusASPX |
A |
Dec. 1, 2020, 12:15 a.m. |
OK |
MS C++ 2017 |
TESTS |
16 |
31 |
0 |
|
|
100071502 |
Tommy_Fang |
A |
Nov. 30, 2020, 11:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
16 |
31 |
102400 |
|
|
100050124 |
edoxa1 |
A |
Nov. 30, 2020, 4:31 p.m. |
OK |
.NET Core C# |
TESTS |
2 |
93 |
0 |
|
|
100047254 |
HNTT |
A |
Nov. 30, 2020, 4:24 p.m. |
OK |
Node.js |
TESTS |
2 |
61 |
0 |
|
|
100059848 |
saitgulmez |
A |
Nov. 30, 2020, 5:54 p.m. |
OK |
PyPy 2 |
TESTS |
5 |
93 |
307200 |
|
|
100047492 |
hacker_noob |
A |
Nov. 30, 2020, 4:24 p.m. |
OK |
PyPy 3 |
TESTS |
2 |
108 |
0 |
|
|
100069660 |
timofeypoverinov |
A |
Nov. 30, 2020, 9:45 p.m. |
OK |
PyPy 3 |
TESTS |
16 |
124 |
0 |
|
|
100063733 |
ritikagarwal4 |
A |
Nov. 30, 2020, 7:04 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100062638 |
tokarev.vlad |
A |
Nov. 30, 2020, 6:43 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100062172 |
bpavan122 |
A |
Nov. 30, 2020, 6:33 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100062127 |
silvertint |
A |
Nov. 30, 2020, 6:32 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100062018 |
abhranildas01 |
A |
Nov. 30, 2020, 6:31 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100061283 |
deepak813071 |
A |
Nov. 30, 2020, 6:18 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100060960 |
TestAnswersHere |
A |
Nov. 30, 2020, 6:12 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100060314 |
devanshsingh |
A |
Nov. 30, 2020, 6:02 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
124 |
0 |
|
|
100078523 |
cky_26 |
A |
Dec. 1, 2020, 4:01 a.m. |
OK |
Python 2 |
TESTS |
16 |
155 |
0 |
|
|
100074159 |
biltharesatyendra |
A |
Dec. 1, 2020, 1:46 a.m. |
OK |
Python 2 |
TESTS |
16 |
155 |
0 |
|
|
100062660 |
sushmanth.dampur8780 |
A |
Nov. 30, 2020, 6:43 p.m. |
OK |
Python 3 |
TESTS |
5 |
77 |
0 |
|
|
100058467 |
BitmasKing |
A |
Nov. 30, 2020, 5:34 p.m. |
OK |
Python 3 |
TESTS |
5 |
77 |
0 |
|
|
100052937 |
bytilda |
A |
Nov. 30, 2020, 4:38 p.m. |
OK |
Python 3 |
TESTS |
2 |
77 |
0 |
|
|
100067159 |
despair_101 |
A |
Nov. 30, 2020, 8:19 p.m. |
OK |
Python 3 |
TESTS |
5 |
78 |
0 |
|
|
100061474 |
Ritika09 |
A |
Nov. 30, 2020, 6:21 p.m. |
OK |
Python 3 |
TESTS |
5 |
92 |
0 |
|
|
100056421 |
sh1194 |
A |
Nov. 30, 2020, 5:08 p.m. |
OK |
Python 3 |
TESTS |
5 |
92 |
0 |
|
|
100083401 |
raunak_priyam |
A |
Dec. 1, 2020, 5:44 a.m. |
OK |
Python 3 |
TESTS |
16 |
93 |
0 |
|
|
100082922 |
rtsaurav |
A |
Dec. 1, 2020, 5:35 a.m. |
OK |
Python 3 |
TESTS |
16 |
93 |
0 |
|
|
100080166 |
madhav154 |
A |
Dec. 1, 2020, 4:40 a.m. |
OK |
Python 3 |
TESTS |
16 |
93 |
0 |
|
|
100079407 |
Infinity8991 |
A |
Dec. 1, 2020, 4:22 a.m. |
OK |
Python 3 |
TESTS |
16 |
93 |
0 |
|
|
100071688 |
Slsvcn |
A |
Nov. 30, 2020, 11:40 p.m. |
OK |
Rust |
TESTS |
16 |
31 |
0 |
|
|
100052994 |
kanik0 |
A |
Nov. 30, 2020, 4:39 p.m. |
OK |
Rust |
TESTS |
2 |
31 |
0 |
|
|
remove filters
Back to search problems