結果
| 問題 |
No.2043 Ohuton and Makura
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-19 23:06:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 473 bytes |
| コンパイル時間 | 635 ms |
| コンパイル使用メモリ | 64,000 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-08 10:33:38 |
| 合計ジャッジ時間 | 26,435 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 TLE * 7 |
ソースコード
#include <iostream>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long a,b,s;
cin>>a>>b>>s;
long long ans=0;
for(long long t=1; t<=s; t++){
for(long long x=1; x*x<=t; x++){
if(t%x!=0) continue;
long long y=t/x;
if(x<=a && y<=b) ans += (a-x+1)*(b-y+1);
if(x!=y && x<=b && y<=a) ans += (b-x+1)*(a-y+1);
}
}
cout<<ans<<endl;
return 0;
}