codeforces-scrape

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

236B.md (1182B)


      1 Source: https://codeforces.com/problemset/problem/236/B
      2 
      3 B. Easy Number Challenge
      4 
      5 time limit per test
      6 
      7 2 seconds
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 stdin
     16 
     17 output
     18 
     19 stdout
     20 
     21 Let's denote *d*(*n*) as the number of divisors of a positive integer *n*. You are given three integers *a*, *b* and *c*. Your task is to calculate the following sum:
     22 
     23 ![](https://espresso.codeforces.com/e052a04f766eb3e258c0b4a039f8da531d8ac734.png)
     24 
     25 Find the sum modulo 1073741824 (230).
     26 
     27 Input
     28 
     29 The first line contains three space-separated integers *a*, *b* and *c* (1 ≤ *a*, *b*, *c* ≤ 100).
     30 
     31 Output
     32 
     33 Print a single integer — the required sum modulo 1073741824 (230).
     34 
     35 Examples
     36 
     37 Input
     38 
     39 ```
     40 2 2 2
     41 ```
     42 
     43 Output
     44 
     45 ```
     46 20
     47 ```
     48 
     49 Input
     50 
     51 ```
     52 5 6 7
     53 ```
     54 
     55 Output
     56 
     57 ```
     58 1520
     59 ```
     60 
     61 Note
     62 
     63 For the first example.
     64 
     65 * *d*(1·1·1) = *d*(1) = 1;
     66 * *d*(1·1·2) = *d*(2) = 2;
     67 * *d*(1·2·1) = *d*(2) = 2;
     68 * *d*(1·2·2) = *d*(4) = 3;
     69 * *d*(2·1·1) = *d*(2) = 2;
     70 * *d*(2·1·2) = *d*(4) = 3;
     71 * *d*(2·2·1) = *d*(4) = 3;
     72 * *d*(2·2·2) = *d*(8) = 4.
     73 
     74 So the result is 1 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 20.