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'A pair of positive integers (a,b) is called special if lfloor frac{a}{b} rfloor = a bmod b . Here, lfloor frac{a}{b} rfloor is the result of the integer division between a and b , while a bmod b is its remainder. You are given two integers x and y . Find the number of special pairs (a,b) such that 1 <= q a <= q x and 1 <= q b <= q y . The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The only line of the description of each test case contains two integers x , y ( 1 <= x,y <= 10^9 ). For each test case print the answer on a single line. In the first test case, the only special pair is (3, 2) . In the second test case, there are no special pairs. In the third test case, there are two special pairs: (3, 2) and (4, 3) . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
107227984 |
ruban |
C |
Feb. 12, 2021, 4:48 p.m. |
OK |
FPC |
TESTS |
51 |
78 |
84172800 |
|
1700 |
107235412 |
Beku.sh |
C |
Feb. 12, 2021, 6:16 p.m. |
OK |
GNU C11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107255516 |
sky123 |
C |
Feb. 13, 2021, 5:28 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107253299 |
ouerwt |
C |
Feb. 13, 2021, 4:32 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107252605 |
dujinyvluori |
C |
Feb. 13, 2021, 4:11 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107252416 |
zhanglichen |
C |
Feb. 13, 2021, 4:04 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107251047 |
liqingyang |
C |
Feb. 13, 2021, 3:22 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107250805 |
fhqTreap |
C |
Feb. 13, 2021, 3:14 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107249870 |
zjz2333 |
C |
Feb. 13, 2021, 2:38 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107249438 |
TwilightShadow |
C |
Feb. 13, 2021, 2:21 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107257218 |
Lazy_to_think |
C |
Feb. 13, 2021, 6:02 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107255617 |
forlight |
C |
Feb. 13, 2021, 5:29 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
0 |
|
1700 |
107251852 |
jinseo |
C |
Feb. 13, 2021, 3:47 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107244149 |
ljupche98 |
C |
Feb. 12, 2021, 9:35 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107242048 |
Dan13llljws |
C |
Feb. 12, 2021, 8:27 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107242031 |
Dan13llljws |
C |
Feb. 12, 2021, 8:26 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107238856 |
Tech_shot |
C |
Feb. 12, 2021, 7:12 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107238392 |
waste_of_space |
C |
Feb. 12, 2021, 7:03 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107234193 |
arv_m |
C |
Feb. 12, 2021, 5:58 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107225158 |
bary |
C |
Feb. 12, 2021, 4:39 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107224906 |
kuzminash |
C |
Feb. 12, 2021, 4:38 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107254419 |
jiuzheyangba. |
C |
Feb. 13, 2021, 5:03 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
0 |
|
1700 |
107252367 |
Zap |
C |
Feb. 13, 2021, 4:03 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107256954 |
AegeanKI |
C |
Feb. 13, 2021, 5:57 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107255976 |
napstablook |
C |
Feb. 13, 2021, 5:37 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107255088 |
Genuine_8 |
C |
Feb. 13, 2021, 5:18 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107253328 |
mdstoy |
C |
Feb. 13, 2021, 4:33 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107251876 |
Muphy |
C |
Feb. 13, 2021, 3:48 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107251527 |
JR_Jahed |
C |
Feb. 13, 2021, 3:37 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107250808 |
achieveyj |
C |
Feb. 13, 2021, 3:14 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107250583 |
-skyline- |
C |
Feb. 13, 2021, 3:06 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107249962 |
DerekFeng |
C |
Feb. 13, 2021, 2:42 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
0 |
|
1700 |
107255006 |
sky_io |
C |
Feb. 13, 2021, 5:16 a.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107253738 |
TiDuNguyen |
C |
Feb. 13, 2021, 4:45 a.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107252676 |
positivity100 |
C |
Feb. 13, 2021, 4:13 a.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107247552 |
zxcvbn15 |
C |
Feb. 13, 2021, 12:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107246950 |
Thallium54 |
C |
Feb. 13, 2021, 12:05 a.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107245607 |
DARK49 |
C |
Feb. 12, 2021, 10:43 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107245573 |
Masum_Billa_19 |
C |
Feb. 12, 2021, 10:41 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107244347 |
antguz |
C |
Feb. 12, 2021, 9:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107244214 |
KevinyWu |
C |
Feb. 12, 2021, 9:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107242209 |
koderkushy |
C |
Feb. 12, 2021, 8:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
31 |
0 |
|
1700 |
107231553 |
0x3F |
C |
Feb. 12, 2021, 5:31 p.m. |
OK |
Go |
TESTS |
51 |
93 |
0 |
|
1700 |
107236920 |
Airflow |
C |
Feb. 12, 2021, 6:40 p.m. |
OK |
Haskell |
TESTS |
51 |
702 |
7475200 |
|
1700 |
107230899 |
Apass.Jack |
C |
Feb. 12, 2021, 5:25 p.m. |
OK |
Java 11 |
TESTS |
51 |
187 |
0 |
|
1700 |
107233995 |
Solstice |
C |
Feb. 12, 2021, 5:55 p.m. |
OK |
Java 11 |
TESTS |
51 |
202 |
0 |
|
1700 |
107233212 |
akokoz |
C |
Feb. 12, 2021, 5:46 p.m. |
OK |
Java 11 |
TESTS |
51 |
217 |
0 |
|
1700 |
107224752 |
mpanyavin |
C |
Feb. 12, 2021, 4:37 p.m. |
OK |
Java 11 |
TESTS |
51 |
217 |
0 |
|
1700 |
107255925 |
SaberXpro |
C |
Feb. 13, 2021, 5:36 a.m. |
OK |
Java 11 |
TESTS |
51 |
218 |
0 |
|
1700 |
107231027 |
khaufnak |
C |
Feb. 12, 2021, 5:27 p.m. |
OK |
Java 11 |
TESTS |
51 |
218 |
0 |
|
1700 |
107230056 |
nirvana_rsc |
C |
Feb. 12, 2021, 5:21 p.m. |
OK |
Java 11 |
TESTS |
51 |
218 |
0 |
|
1700 |
107220540 |
Akram-Adel |
C |
Feb. 12, 2021, 4:20 p.m. |
OK |
Java 11 |
TESTS |
51 |
248 |
0 |
|
1700 |
107253317 |
nextsnake |
C |
Feb. 13, 2021, 4:33 a.m. |
OK |
Java 11 |
TESTS |
51 |
265 |
0 |
|
1700 |
107220314 |
skittles1412 |
C |
Feb. 12, 2021, 4:19 p.m. |
OK |
Java 11 |
TESTS |
51 |
265 |
0 |
|
1700 |
107233996 |
dante1 |
C |
Feb. 12, 2021, 5:55 p.m. |
OK |
Java 8 |
TESTS |
51 |
124 |
0 |
|
1700 |
107232322 |
reennn |
C |
Feb. 12, 2021, 5:37 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
0 |
|
1700 |
107229795 |
Abdallah_Ragab00 |
C |
Feb. 12, 2021, 5:20 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
0 |
|
1700 |
107226137 |
nickmikemurderer |
C |
Feb. 12, 2021, 4:42 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
0 |
|
1700 |
107222733 |
AshrafEzz |
C |
Feb. 12, 2021, 4:29 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
0 |
|
1700 |
107220619 |
AdhmMohamed |
C |
Feb. 12, 2021, 4:20 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
0 |
|
1700 |
107250281 |
Extends |
C |
Feb. 13, 2021, 2:55 a.m. |
OK |
Java 8 |
TESTS |
51 |
155 |
0 |
|
1700 |
107236339 |
This_is_the_one |
C |
Feb. 12, 2021, 6:31 p.m. |
OK |
Java 8 |
TESTS |
51 |
155 |
0 |
|
1700 |
107232660 |
Zahid_Hasan_Sahin |
C |
Feb. 12, 2021, 5:41 p.m. |
OK |
Java 8 |
TESTS |
51 |
155 |
0 |
|
1700 |
107250815 |
aggarwalanshul01 |
C |
Feb. 13, 2021, 3:14 a.m. |
OK |
Java 8 |
TESTS |
51 |
171 |
0 |
|
1700 |
107247377 |
Spheniscine |
C |
Feb. 13, 2021, 12:33 a.m. |
OK |
Kotlin |
TESTS |
51 |
139 |
0 |
|
1700 |
107227814 |
Scotty_pwnz |
C |
Feb. 12, 2021, 4:48 p.m. |
OK |
Kotlin |
TESTS |
51 |
171 |
0 |
|
1700 |
107226972 |
PavelChadnov |
C |
Feb. 12, 2021, 4:45 p.m. |
OK |
Kotlin |
TESTS |
51 |
171 |
0 |
|
1700 |
107220850 |
Potassium |
C |
Feb. 12, 2021, 4:21 p.m. |
OK |
Kotlin |
TESTS |
51 |
202 |
307200 |
|
1700 |
107230720 |
Tlatoani |
C |
Feb. 12, 2021, 5:24 p.m. |
OK |
Kotlin |
TESTS |
51 |
685 |
0 |
|
1700 |
107230615 |
Tlatoani |
C |
Feb. 12, 2021, 5:24 p.m. |
OK |
Kotlin |
TESTS |
51 |
857 |
0 |
|
1700 |
107232918 |
jonitox |
C |
Feb. 12, 2021, 5:43 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
46 |
0 |
|
1700 |
107228592 |
grey |
C |
Feb. 12, 2021, 4:49 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
46 |
0 |
|
1700 |
107225944 |
GeKa |
C |
Feb. 12, 2021, 4:41 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
46 |
0 |
|
1700 |
107221121 |
nortonlrc |
C |
Feb. 12, 2021, 4:22 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
46 |
0 |
|
1700 |
107253617 |
bkifhr10 |
C |
Feb. 13, 2021, 4:42 a.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
61 |
0 |
|
1700 |
107234975 |
getN1ght |
C |
Feb. 12, 2021, 6:09 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
61 |
0 |
|
1700 |
107230355 |
Albertplus007 |
C |
Feb. 12, 2021, 5:22 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
62 |
0 |
|
1700 |
107226265 |
NikoSun |
C |
Feb. 12, 2021, 4:43 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
62 |
0 |
|
1700 |
107220288 |
P___ |
C |
Feb. 12, 2021, 4:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
171 |
307200 |
|
1700 |
107219980 |
Gravekper |
C |
Feb. 12, 2021, 4:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
312 |
0 |
|
1700 |
107233575 |
tennisru |
C |
Feb. 12, 2021, 5:50 p.m. |
OK |
Node.js |
TESTS |
51 |
171 |
2252800 |
|
1700 |
107239681 |
beethoven97 |
C |
Feb. 12, 2021, 7:29 p.m. |
OK |
PyPy 2 |
TESTS |
51 |
171 |
921600 |
|
1700 |
107225160 |
rishabnahar2025 |
C |
Feb. 12, 2021, 4:39 p.m. |
OK |
PyPy 2 |
TESTS |
51 |
280 |
8806400 |
|
1700 |
107247508 |
lebron87 |
C |
Feb. 13, 2021, 12:42 a.m. |
OK |
PyPy 2 |
TESTS |
51 |
280 |
9318400 |
|
1700 |
107221890 |
beethoven97 |
C |
Feb. 12, 2021, 4:25 p.m. |
OK |
PyPy 2 |
TESTS |
51 |
1107 |
2457600 |
|
1700 |
107255710 |
jisun05 |
C |
Feb. 13, 2021, 5:32 a.m. |
OK |
PyPy 3 |
TESTS |
51 |
139 |
1843200 |
|
1700 |
107218891 |
david-mm |
C |
Feb. 12, 2021, 4:13 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
155 |
1536000 |
|
1700 |
107219104 |
so4649 |
C |
Feb. 12, 2021, 4:14 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
155 |
2048000 |
|
1700 |
107241597 |
Genius3435 |
C |
Feb. 12, 2021, 8:16 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
155 |
2150400 |
|
1700 |
107252478 |
k039 |
C |
Feb. 13, 2021, 4:06 a.m. |
OK |
PyPy 3 |
TESTS |
51 |
156 |
2048000 |
|
1700 |
107235695 |
Genius3435 |
C |
Feb. 12, 2021, 6:20 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
156 |
2252800 |
|
1700 |
107225410 |
atzhh |
C |
Feb. 12, 2021, 4:40 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
170 |
1945600 |
|
1700 |
107231342 |
yinuowang |
C |
Feb. 12, 2021, 5:29 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
171 |
1331200 |
|
1700 |
107219201 |
Lyamzin_alexandr |
C |
Feb. 12, 2021, 4:14 p.m. |
OK |
PyPy 3 |
TESTS |
51 |
171 |
1843200 |
|
1700 |
107249815 |
QuantumCoding |
C |
Feb. 13, 2021, 2:36 a.m. |
OK |
PyPy 3 |
TESTS |
51 |
171 |
1945600 |
|
1700 |
107225741 |
arpan.parikh |
C |
Feb. 12, 2021, 4:41 p.m. |
OK |
Python 3 |
TESTS |
51 |
1201 |
307200 |
|
1700 |
107230888 |
samyaksrivastava9 |
C |
Feb. 12, 2021, 5:25 p.m. |
OK |
Python 3 |
TESTS |
51 |
1528 |
0 |
|
1700 |
107218926 |
onepiecehoki |
C |
Feb. 12, 2021, 4:13 p.m. |
OK |
Python 3 |
TESTS |
51 |
1684 |
0 |
|
1700 |
107227330 |
god_gyeol |
C |
Feb. 12, 2021, 4:46 p.m. |
OK |
Python 3 |
TESTS |
51 |
1777 |
0 |
|
1700 |
107241202 |
sayan_india |
C |
Feb. 12, 2021, 8:06 p.m. |
OK |
Python 3 |
TESTS |
51 |
1871 |
0 |
|
1700 |
107229857 |
recuraki |
C |
Feb. 12, 2021, 5:20 p.m. |
OK |
Python 3 |
TESTS |
51 |
1886 |
716800 |
|
1700 |
107255315 |
sh1194 |
C |
Feb. 13, 2021, 5:23 a.m. |
OK |
Python 3 |
TESTS |
51 |
1996 |
0 |
|
1700 |
107238932 |
jaydeepmaddipati |
C |
Feb. 12, 2021, 7:14 p.m. |
OK |
Rust |
TESTS |
51 |
61 |
0 |
|
1700 |
107221613 |
GraphTheory |
C |
Feb. 12, 2021, 4:24 p.m. |
OK |
Rust |
TESTS |
51 |
186 |
0 |
|
1700 |
remove filters
Back to search problems