Download spoj_cpp_clean/AE00/AE00-11.cpp from slayone/uva_spoj_raw: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/spoj_cpp_clean/AE00/AE00-11.cpp
- Command line
-
hf download hf://datasets/slayone/uva_spoj_raw/spoj_cpp_clean/AE00/AE00-11.cpp
-
curl -L -o AE00-11.cpp https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/spoj_cpp_clean/AE00/AE00-11.cpp
369 Bytes
| /* | |
| * Written by Nitin Kumar Maharana | |
| * nitin.maharana@gmail.com | |
| */ | |
| using namespace std; | |
| int main(void) | |
| { | |
| int n; | |
| long result; | |
| cin >> n; | |
| result = 0l; | |
| result += n; | |
| for(int i = 2; i <= n/2; i++) | |
| { | |
| if(i*i <= n) | |
| result += (i-1); | |
| else | |
| { | |
| for(int j = 2; i*j <= n; j++) | |
| result++; | |
| } | |
| } | |
| cout << result << endl; | |
| return 0; | |
| } |