結果

問題 No.2043 Ohuton and Makura
ユーザー asumo0729asumo0729
提出日時 2022-08-19 21:32:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 1,012 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 68,352 KB
最終ジャッジ日時 2024-04-17 00:12:47
合計ジャッジ時間 2,281 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
60,928 KB
testcase_01 AC 53 ms
60,928 KB
testcase_02 AC 69 ms
66,944 KB
testcase_03 AC 66 ms
66,432 KB
testcase_04 AC 73 ms
67,968 KB
testcase_05 AC 66 ms
65,920 KB
testcase_06 AC 62 ms
64,640 KB
testcase_07 AC 63 ms
67,200 KB
testcase_08 AC 62 ms
65,152 KB
testcase_09 AC 70 ms
66,816 KB
testcase_10 AC 70 ms
67,712 KB
testcase_11 AC 67 ms
65,920 KB
testcase_12 AC 52 ms
61,440 KB
testcase_13 AC 61 ms
66,560 KB
testcase_14 AC 52 ms
61,440 KB
testcase_15 AC 52 ms
61,312 KB
testcase_16 AC 53 ms
61,184 KB
testcase_17 AC 62 ms
66,816 KB
testcase_18 AC 75 ms
68,352 KB
testcase_19 AC 73 ms
67,712 KB
testcase_20 AC 72 ms
67,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0