結果

問題 No.2043 Ohuton and Makura
コンテスト
ユーザー chineristAC
提出日時 2022-08-19 22:07:48
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 42 ms / 2,000 ms
+ 22µs
コード長 490 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 73 ms
コンパイル使用メモリ 80,640 KB
実行使用メモリ 66,432 KB
最終ジャッジ日時 2026-09-11 22:56:10
合計ジャッジ時間 2,288 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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