結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A, B, S;
  cin >> A >> B >> S;
  long long ans = 0;
  for (int i = 1; i <= S; i++){
    for (int j = 1; i * j <= S; j++){
      if (A >= i && B >= j){
        ans += (long long) (A - i + 1) * (B - j + 1);
      }
    }
  }
  cout << ans << endl;
}
0