結果
問題 | No.2043 Ohuton and Makura |
ユーザー |
![]() |
提出日時 | 2022-08-19 22:34:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 844 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 2,004 ms |
コンパイル使用メモリ | 193,088 KB |
最終ジャッジ日時 | 2025-01-31 01:25:47 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long A,B,S; cin>>A>>B>>S; long long ans = 0; for(int i=1;i<=S;i++){ for(int j=1;j*j<=i;j++){ if(i%j != 0) continue; if(j <= A && i/j <= B)ans += (A-j+1)*(B-i/j+1); if(j*j == i) continue; if(i/j <= A && j <= B)ans += (A-i/j+1)*(B-j+1); } } cout<<ans<<endl; }