結果
問題 | No.1446 ハンバーグと納豆ごはん |
ユーザー |
![]() |
提出日時 | 2021-05-18 20:05:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 1,845 ms |
コンパイル使用メモリ | 192,868 KB |
最終ジャッジ日時 | 2025-01-21 13:44:28 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i,n) for(int i=0;i<n;i++)typedef long long ll;#define int long longsigned main(){int a,b,n,m;cin>>a>>b>>n>>m;int ans=min(a,b);if(a>b){ans+=(a-b)/(n+1);}if(b>a){ans+=(b-a)/(m+1);}cout<<ans<<endl;return 0;}