# DCP-190: Divisor - Multiple Back to All Problems

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 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

# 74/485

Solve/Submission

### Ranking

# User Language Timing
01 feodorv Cpp14 0.02s
02 Morass Cpp14 0.02s
03 tariqiitju Cpp 0.03s
04 orpib Cpp14 0.03s
05 subhashis_cse Cpp14 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 haasib Cpp14 0.07s
16 monir769 Cpp 0.07s
17 mahmud2690 Cpp14 0.07s
18 abdulmukit Cpp 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 PKP_Junior Cpp14 0.17s
31 MRITuhin Cpp14 0.17s
32 silentboy302 Cpp14 0.17s
33 Pure_Protea Cpp14 0.17s
34 CodeSlayerOmega Cpp14 0.18s
35 seyedssz Cpp14 0.18s
36 trifiasco Cpp14 0.19s
37 ____ Cpp14 0.19s
38 Ansarul_14 Cpp14 0.22s
39 xpo6 Cpp14 0.24s
40 swapnilsaha Cpp14 0.47s
42 Rajan_sust Cpp14 0.52s
43 sakib_muhit Cpp14 0.53s
44 DynamicOvi Cpp14 0.53s
45 yakin Cpp14 0.54s
46 SKL12 Cpp14 0.55s
47 MazedRupok Cpp14 0.55s