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 given two positive integers a and b . There are two possible operations: What is the minimum number of operations required to obtain two integers having the same number of divisors? You are given several such pairs, you need to find the answer for each of them. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of pairs of integers for which you are to find the answer. Each of the next t lines contain two integers a_i and b_i ( 1 <= a_i, b_i <= 10^6 ). Output t lines -- the i -th of them should contain the answer for the pair a_i , b_i . These are the numbers with equal number of divisors, which are optimal to obtain in the sample test case: Note that there can be several optimal pairs of numbers. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
57868783 |
lopare |
F |
July 27, 2019, 11:38 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
468 |
56832000 |
|
2700 |
57737483 |
py_ultron |
F |
July 25, 2019, 10:23 a.m. |
OK |
GNU C++11 |
TESTS |
27 |
483 |
56832000 |
|
2700 |
46248361 |
luogu_bot4 |
F |
Nov. 26, 2018, 12:47 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
514 |
85606400 |
|
2700 |
46250186 |
CrazyTeaMajor |
F |
Nov. 26, 2018, 1:47 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
514 |
122368000 |
|
2700 |
44664578 |
dreal |
F |
Oct. 21, 2018, 5:08 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
1044 |
99430400 |
|
2700 |
44652731 |
GDolphin |
F |
Oct. 21, 2018, 11:57 a.m. |
OK |
GNU C++11 |
TESTS |
27 |
1060 |
99430400 |
|
2700 |
44815445 |
1e18 |
F |
Oct. 24, 2018, 9:07 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
1169 |
59596800 |
|
2700 |
44696825 |
tmwilliamlin168 |
F |
Oct. 22, 2018, 1:17 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
452 |
12902400 |
|
2700 |
63787062 |
NotNight |
F |
Oct. 30, 2019, 12:37 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
468 |
9830400 |
|
2700 |
44696583 |
tmwilliamlin168 |
F |
Oct. 22, 2018, 1:12 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
483 |
12800000 |
|
2700 |
44696518 |
tmwilliamlin168 |
F |
Oct. 22, 2018, 1:11 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
483 |
12902400 |
|
2700 |
45323292 |
jslijin |
F |
Nov. 5, 2018, 11:41 a.m. |
OK |
GNU C++14 |
TESTS |
27 |
561 |
57753600 |
|
2700 |
47523077 |
a.nabil |
F |
Dec. 26, 2018, 2:12 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
576 |
13209600 |
|
2700 |
47522855 |
a.nabil |
F |
Dec. 26, 2018, 2:05 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
576 |
13209600 |
|
2700 |
53907278 |
bhargav_0085 |
F |
May 9, 2019, 1:26 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
592 |
13209600 |
|
2700 |
47522686 |
a.nabil |
F |
Dec. 26, 2018, 1:59 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
592 |
13209600 |
|
2700 |
47522565 |
a.nabil |
F |
Dec. 26, 2018, 1:55 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
592 |
13209600 |
|
2700 |
44770309 |
redbag |
F |
Oct. 24, 2018, 12:03 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
139 |
409600 |
|
2700 |
44751726 |
ReaLNero1 |
F |
Oct. 23, 2018, 8:19 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
171 |
4505600 |
|
2700 |
61732896 |
tfg |
F |
Oct. 2, 2019, 5:16 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
265 |
7782400 |
|
2700 |
44765272 |
BlackRain |
F |
Oct. 24, 2018, 9:28 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
296 |
17612800 |
|
2700 |
62382039 |
Umi |
F |
Oct. 11, 2019, 7:31 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
374 |
9728000 |
|
2700 |
64787945 |
hjk1030 |
F |
Nov. 13, 2019, 9:55 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
405 |
18329600 |
|
2700 |
44690553 |
314rate |
F |
Oct. 22, 2018, 11:51 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
561 |
46592000 |
|
2700 |
46102978 |
Cueball1234 |
F |
Nov. 23, 2018, 7:15 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
686 |
4505600 |
|
2700 |
66646236 |
Martin53 |
F |
Dec. 11, 2019, 4:52 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
764 |
17817600 |
|
2700 |
44646042 |
Holidin |
F |
Oct. 21, 2018, 10 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
935 |
99840000 |
|
2700 |
51058742 |
tri |
F |
March 9, 2019, 1:20 a.m. |
OK |
Java 8 |
TESTS |
27 |
452 |
0 |
|
2700 |
remove filters
Back to search problems