結果

問題 No.2043 Ohuton and Makura
ユーザー chineristACchineristAC
提出日時 2022-08-19 22:07:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 63,616 KB
最終ジャッジ日時 2024-04-17 00:48:40
合計ジャッジ時間 2,193 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
55,552 KB
testcase_01 AC 46 ms
55,296 KB
testcase_02 AC 58 ms
62,720 KB
testcase_03 AC 57 ms
62,336 KB
testcase_04 AC 61 ms
62,592 KB
testcase_05 AC 59 ms
61,824 KB
testcase_06 AC 56 ms
62,592 KB
testcase_07 AC 60 ms
61,952 KB
testcase_08 AC 55 ms
62,336 KB
testcase_09 AC 59 ms
62,336 KB
testcase_10 AC 61 ms
62,336 KB
testcase_11 AC 58 ms
62,080 KB
testcase_12 AC 48 ms
55,680 KB
testcase_13 AC 63 ms
62,848 KB
testcase_14 AC 48 ms
55,936 KB
testcase_15 AC 47 ms
55,552 KB
testcase_16 AC 46 ms
55,936 KB
testcase_17 AC 66 ms
63,616 KB
testcase_18 AC 58 ms
61,440 KB
testcase_19 AC 60 ms
61,696 KB
testcase_20 AC 62 ms
61,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush
from itertools import cycle, permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

A,B,S = mi()

res = 0
for h in range(1,S+1):
    w_max = min(S//h,B)
    if h <= A:
        #res += (A-h+1) * (B-w+1)
        res += (A-h+1) * (w_max * (B+1) - w_max * (w_max+1)//2)

print(res)

0