結果
| 問題 |
No.2043 Ohuton and Makura
|
| コンテスト | |
| ユーザー |
asumo0729
|
| 提出日時 | 2022-08-19 21:32:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 2,000 ms |
| コード長 | 1,012 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 81,584 KB |
| 実行使用メモリ | 68,640 KB |
| 最終ジャッジ日時 | 2024-10-08 07:40:52 |
| 合計ジャッジ時間 | 2,756 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
import sys
from operator import itemgetter
from collections import defaultdict, deque
import heapq
from heapq import heapify, heappop, _heapify_max, heappush
from bisect import bisect_left, bisect_right
import math
import itertools
import copy
stdin=sys.stdin
#sys.setrecursionlimit(10 ** 7)
## import pypyjit
## pypyjit.set_param('max_unroll_recursion=-1')
ip=lambda: int(sp())
fp=lambda: float(sp())
lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()
Yp=lambda:print('Yes')
Np=lambda:print('No')
inf = 1 << 60
mod = 10 ** 9 + 7
mod = 998244353
eps = 1e-9
sortkey1 = itemgetter(0)
sortkey2 = lambda x: (x[0], x[1])
###############################################################
A, B, S = lp()
ans = 0
acc = [0 for _ in range(S + 5)]
for i in range(1, S + 1):
if A >= i:
x = A - i + 1
else:
x = 0
acc[i] += acc[i - 1] + x
for i in range(1, S + 1):
if B < i:
break
x = B - i + 1
y = acc[S // i]
ans += x * y
print(ans)
asumo0729