Submission #20379653


Source Code Expand

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline bool chmin(A &a,const B &b){if(a>b){a=b;return true;}else{return false;}}
template<typename A,typename B>inline bool chmax(A &a,const B &b){if(a<b){a=b;return true;}else{return false;}}

int main(){
    int K;
    cin >> K;
    ll ans = 0;
    for(int i=1; i<=K; i++){
        int L = K/i;
        for(int j=1; j<=L; j++){
            ans += L/j;
        }
    }
    cout << ans << endl;
}

Submission Info

Submission Time
Task A - A*B*C
User kiuyuki
Language C++ (GCC 9.2.1)
Score 300
Code Size 896 Byte
Status AC
Exec Time 17 ms
Memory 3664 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 10
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 14 ms 3628 KiB
02.txt AC 14 ms 3500 KiB
03.txt AC 9 ms 3504 KiB
04.txt AC 6 ms 3556 KiB
05.txt AC 3 ms 3584 KiB
06.txt AC 2 ms 3576 KiB
07.txt AC 17 ms 3456 KiB
s1.txt AC 3 ms 3656 KiB
s2.txt AC 2 ms 3664 KiB
s3.txt AC 4 ms 3444 KiB