結果

問題 No.1350 2019-6problem
ユーザー Noboru2020
提出日時 2021-01-17 13:20:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 1,532 ms
コンパイル使用メモリ 165,256 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 13:52:20
合計ジャッジ時間 2,087 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    int a,b,k;
    cin>>a>>b>>k;
    int x=(k*a-1)/(a+b);
    int y=k-x;
    cout<<max(x*b,y*a)<<endl;
}
0