ソースコード 拡げる

Copy
```"""O(N^0.5) solution"""

N = int(input())
N -= 1

ans = 0
n = int(N**.5)
for x in range(1, n+1):
# (x,x)
ans += 1
# (x,y)
ans += N//x - x
# (y,x)
ans += N//x - x

print(ans)```

#### 提出情報

提出日時 2020-09-19 22:08:54+0900 C - A x B + C maspy Python (3.8.2) 300 200 Byte AC 31 ms 9360 KB

#### ジャッジ結果

セット名 Sample All

 AC × 3
 AC × 37
セット名 テストケース
Sample 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt
All 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-small-01.txt, 01-small-02.txt, 01-small-03.txt, 01-small-04.txt, 01-small-05.txt, 01-small-06.txt, 01-small-07.txt, 01-small-08.txt, 01-small-09.txt, 01-small-10.txt, 02-min-01.txt, 03-random-01.txt, 03-random-02.txt, 03-random-03.txt, 03-random-04.txt, 03-random-05.txt, 05-highly-composite-number-01.txt, 05-highly-composite-number-02.txt, 05-highly-composite-number-03.txt, 05-highly-composite-number-04.txt, 05-highly-composite-number-05.txt, 06-highly-composite-number-01.txt, 06-highly-composite-number-02.txt, 06-highly-composite-number-03.txt, 06-highly-composite-number-04.txt, 06-highly-composite-number-05.txt, 07-highly-composite-number-01.txt, 07-highly-composite-number-02.txt, 07-highly-composite-number-03.txt, 07-highly-composite-number-04.txt, 07-highly-composite-number-05.txt, 08-max-01.txt, 08-max-02.txt, 08-max-03.txt
ケース名 結果 実行時間 メモリ
00-sample-01.txt AC 29 ms 9296 KB
00-sample-02.txt AC 28 ms 9096 KB
00-sample-03.txt AC 21 ms 9288 KB
01-small-01.txt AC 25 ms 9276 KB
01-small-02.txt AC 24 ms 9272 KB
01-small-03.txt AC 28 ms 9108 KB
01-small-04.txt AC 27 ms 9096 KB
01-small-05.txt AC 27 ms 9232 KB
01-small-06.txt AC 25 ms 9292 KB
01-small-07.txt AC 30 ms 9104 KB
01-small-08.txt AC 20 ms 9272 KB
01-small-09.txt AC 30 ms 9232 KB
01-small-10.txt AC 22 ms 9228 KB
02-min-01.txt AC 27 ms 8968 KB
03-random-01.txt AC 21 ms 9292 KB
03-random-02.txt AC 26 ms 9288 KB
03-random-03.txt AC 26 ms 9096 KB
03-random-04.txt AC 29 ms 9092 KB
03-random-05.txt AC 26 ms 9172 KB
05-highly-composite-number-01.txt AC 20 ms 9352 KB
05-highly-composite-number-02.txt AC 31 ms 9268 KB
05-highly-composite-number-03.txt AC 24 ms 9164 KB
05-highly-composite-number-04.txt AC 28 ms 9292 KB
05-highly-composite-number-05.txt AC 26 ms 9096 KB
06-highly-composite-number-01.txt AC 29 ms 9260 KB
06-highly-composite-number-02.txt AC 31 ms 9092 KB
06-highly-composite-number-03.txt AC 22 ms 9100 KB
06-highly-composite-number-04.txt AC 19 ms 9100 KB
06-highly-composite-number-05.txt AC 28 ms 9208 KB
07-highly-composite-number-01.txt AC 30 ms 9360 KB
07-highly-composite-number-02.txt AC 20 ms 9232 KB
07-highly-composite-number-03.txt AC 25 ms 9256 KB
07-highly-composite-number-04.txt AC 31 ms 9272 KB
07-highly-composite-number-05.txt AC 30 ms 9352 KB
08-max-01.txt AC 25 ms 9092 KB
08-max-02.txt AC 26 ms 9292 KB
08-max-03.txt AC 27 ms 9228 KB