結果
問題 |
No.1446 ハンバーグと納豆ごはん
|
ユーザー |
![]() |
提出日時 | 2021-03-31 20:15:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 633 ms |
コンパイル使用メモリ | 68,208 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 07:39:18 |
合計ジャッジ時間 | 1,500 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long a,b,n,m; cin >> a >> b>> n>>m; if (a<b){ swap(a,b); swap(n,m); } long long ans = b + (a-b)/(n+1); cout << ans << endl; }