Submission #27218294


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main() {

  long long n, res = 0;
  cin >> n;
  for (long long a = 1; a * a * a <= n; ++ a) {
    long long rest = n / a;
    for (long long b = a; b * b <= rest; ++ b) {
      res += rest / b - b + 1;
    }
  }
  cout << res;
}

Submission Info

Submission Time
Task C - ABC conjecture
User npnkhoi
Language C++ (GCC 9.2.1)
Score 300
Code Size 293 Byte
Status AC
Exec Time 258 ms
Memory 3640 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 20
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 49 ms 3568 KiB
random_02.txt AC 127 ms 3628 KiB
random_03.txt AC 122 ms 3640 KiB
random_04.txt AC 250 ms 3592 KiB
random_05.txt AC 29 ms 3400 KiB
random_06.txt AC 253 ms 3568 KiB
random_07.txt AC 256 ms 3596 KiB
random_08.txt AC 256 ms 3624 KiB
random_09.txt AC 253 ms 3640 KiB
random_10.txt AC 250 ms 3532 KiB
random_11.txt AC 2 ms 3568 KiB
random_12.txt AC 255 ms 3600 KiB
random_13.txt AC 187 ms 3448 KiB
random_14.txt AC 168 ms 3552 KiB
random_15.txt AC 83 ms 3556 KiB
random_16.txt AC 142 ms 3572 KiB
random_17.txt AC 89 ms 3636 KiB
sample_01.txt AC 2 ms 3412 KiB
sample_02.txt AC 2 ms 3572 KiB
sample_03.txt AC 258 ms 3436 KiB