Skip to content

Instantly share code, notes, and snippets.

@uchidama
Created July 4, 2021 14:51
Show Gist options
  • Select an option

  • Save uchidama/05598391490079f4be9f959bf3da2556 to your computer and use it in GitHub Desktop.

Select an option

Save uchidama/05598391490079f4be9f959bf3da2556 to your computer and use it in GitHub Desktop.
AtCoder Beginner Contest 179 [ C - A x B + C ] https://atcoder.jp/contests/abc179/tasks/abc179_c
'''
[問題]
https://atcoder.jp/contests/abc179/tasks/abc179_c
[解説]
公式放送
https://youtu.be/1BlDPBKtKKE?t=1076
 なるほどねー。snukeさんの解説が、わかりやすい。
'''
import sys
sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ
input = sys.stdin.readline
INF = 2 ** 63 - 1
N = int(input())
ans = 0
for a in range(1, N):
ans += (N-1)//a
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment