codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

577A.md (1113B)


      1 Source: https://codeforces.com/problemset/problem/577/A
      2 
      3 A. Multiplication Table
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 Let's consider a table consisting of *n* rows and *n* columns. The cell located at the intersection of *i*-th row and *j*-th column contains number *i* × *j*. The rows and columns are numbered starting from 1.
     22 
     23 You are given a positive integer *x*. Your task is to count the number of cells in a table that contain number *x*.
     24 
     25 Input
     26 
     27 The single line contains numbers *n* and *x* (1 ≤ *n* ≤ 105, 1 ≤ *x* ≤ 109) — the size of the table and the number that we are looking for in the table.
     28 
     29 Output
     30 
     31 Print a single number: the number of times *x* occurs in the table.
     32 
     33 Examples
     34 
     35 Input
     36 
     37 ```
     38 10 5
     39 ```
     40 
     41 Output
     42 
     43 ```
     44 2
     45 ```
     46 
     47 Input
     48 
     49 ```
     50 6 12
     51 ```
     52 
     53 Output
     54 
     55 ```
     56 4
     57 ```
     58 
     59 Input
     60 
     61 ```
     62 5 13
     63 ```
     64 
     65 Output
     66 
     67 ```
     68 0
     69 ```
     70 
     71 Note
     72 
     73 A table for the second sample test is given below. The occurrences of number 12 are marked bold.
     74 
     75  ![](https://espresso.codeforces.com/ce576acaff58a0952156ccdc250511cbf0908cd3.png)