DCP-190: Divisor - Multiple Back to All Problems

Easy Beginners Problems > Ad-hoc


Given two integers **A** and **B**. Find the number of values that are multiple of **A** and divisor of **B**. Input: ------ Input starts with an integer **T (1 <= T <= 100)**, denoting the number of test cases. Each case contains two integer **A** and **B**. There are two types of test cases. - **1 <= A, B <= 10^12** - **10^6 <= A,B <= 10^18** Output: ------- For each test case print the case number and the number of values that are multiple of **A** and divisor of **B**. Sample Input ------------ 2 3 12 6 72 Sample Output ------------- Case 1: 3 Case 2: 6 Clarifications ------------- For case 1, the values are 3, 6, 12 For case 2, the values are 6, 12, 18, 24, 36, 72


Problem Setter:

Feroz Ahmmed

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 2.00
C++ 2.00
C++14 2.00
C# 3.00
Go 3.00
Java 3.00
JavaScript 3.00
Objective-C 3.00
Perl 3.00
PHP 3.00
Python 3.00
Python3 3.00
Ruby 3.00
VB.Net 3.00

Problem Stats

74/485

Solve/Submission

Ranking

# User Language Timing
01 feodorv Cpp14 0.02s
02 Morass Cpp14 0.02s
03 orpib Cpp14 0.03s
04 subhashis_cse Cpp14 0.03s
05 tariqiitju Cpp 0.03s
06 anindita Cpp14 0.03s
07 zyyxxx Cpp14 0.03s
08 sazal_dev Cpp14 0.03s
09 kamrulashraf Cpp14 0.04s
10 siamcr7 Cpp14 0.04s
11 Robbinb1993 Cpp 0.04s
12 alamin39 Cpp14 0.05s
13 zahid119 Cpp14 0.05s
14 smriad Cpp 0.07s
15 monir769 Cpp 0.07s
16 mahmud2690 Cpp14 0.07s
17 abdulmukit Cpp 0.07s
18 haasib Cpp14 0.07s
19 hmtanbir Cpp14 0.07s
20 jualahmed Cpp14 0.08s
21 onucsecu Cpp14 0.08s
22 deder Cpp14 0.08s
23 asma_chy Cpp14 0.09s
24 daihan_mbstu Cpp14 0.10s
25 Optimus_primeV2 Cpp14 0.10s
26 saurabh3240 Cpp14 0.12s
27 rajdipsaha Cpp14 0.14s
28 devcoder CSharp 0.15s
29 moshiur_cse15 Cpp14 0.16s
30 silentboy302 Cpp14 0.17s
31 PKP_Junior Cpp14 0.17s
32 MRITuhin Cpp14 0.17s
33 Pure_Protea Cpp14 0.17s
34 CodeSlayerOmega Cpp14 0.18s
35 seyedssz Cpp14 0.18s
36 ____ Cpp14 0.19s
37 Ansarul_14 Cpp14 0.22s
38 ToErr Cpp14 0.24s
39 swapnilsaha Cpp14 0.47s
40 iamsadee Cpp14 0.51s
41 Rajan_sust Cpp14 0.52s
42 sakib_muhit Cpp14 0.53s
43 DynamicOvi Cpp14 0.53s
44 yakin Cpp14 0.54s
45 MazedRupok Cpp14 0.55s
46 SKL12 Cpp14 0.55s
47 murad_al_wajed Cpp14 0.56s
48 7Mahfuz Cpp14 0.56s
49 a_rahman Cpp14 0.56s
50 prantacse14 Cpp14 0.56s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support