Submit | All submissions | Best solutions | Back to list |
MATHII - Yet Another Mathematical Problem |
Calculate the number of ordered triples of positive integers (a, b, c) such that their multiple abc is not larger than a given integer N (1 <= N <= 1011).
Input
Each test case contains a single line - N. Input terminates by EOF.
Output
For each test case output its case number (starting from 1) and the answer in a single line.
Example
Input: 1 3 6 10 15 21 28 Output: Case 1: 1 Case 2: 7 Case 3: 25 Case 4: 53 Case 5: 95 Case 6: 161 Case 7: 246
Added by: | Fudan University Problem Setters |
Date: | 2012-11-21 |
Time limit: | 3s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | ACM/ICPC Regional Contest, Chengdu 2012 |
hide comments
2022-05-10 05:12:11 [Rampage] Blue.Mary
My solution doesn't use cbrt() function at all. Don't know why cbrt() function must be used. |
|
2022-05-10 03:28:50 Ishan
For me even cbrt() didn't make the cut, cbrtl() did. Wonder how the problemsetter ensured the correctness of his solutions. |
|
2021-08-28 20:25:59
Is there a way to calculate this faster than O(n^(5/9)) ? |
|
2018-02-07 18:26:20 [Lakshman]
Never thought my heavily optimized with complexity more than $O(n^{2/3})) $ can get AC. Was this problem designed to get AC with complexity more than $O(n^{2/3})) $solution? Re: Maybe I should change the time limit after the compiler has been updated. Last edit: 2018-02-08 05:30:14 |
|
2014-07-18 12:53:16 wellwet
Precision problem with spoj' cbrt() is annoying... |
|
2012-11-24 15:06:02 :D
Yes, it seems that pretty big complexities like that are in the intended solutions range. |