結果

問題 No.2043 Ohuton and Makura
ユーザー kotatsugame
提出日時 2022-08-19 21:32:52
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 600 ms
コンパイル使用メモリ 65,332 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-08 07:41:24
合計ジャッジ時間 1,414 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int A,B,S;
int main()
{
	cin>>A>>B>>S;
	long ans=0;
	for(int x=1;x<=S&&x<=A;x++)
	{
		long up=min(B,S/x);
		ans+=(long)(A-x+1)*((B+1)*up-up*(up+1)/2);
	}
	cout<<ans<<endl;
}
0