結果

問題 No.2043 Ohuton and Makura
ユーザー uytvccuytvcc
提出日時 2022-08-19 23:06:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 473 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 63,988 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 01:45:46
合計ジャッジ時間 26,390 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1,170 ms
5,376 KB
testcase_03 AC 1,106 ms
5,376 KB
testcase_04 TLE -
testcase_05 AC 1,265 ms
5,376 KB
testcase_06 AC 110 ms
5,376 KB
testcase_07 TLE -
testcase_08 AC 197 ms
5,376 KB
testcase_09 AC 1,258 ms
5,376 KB
testcase_10 AC 1,921 ms
5,376 KB
testcase_11 AC 1,235 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 TLE -
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0