結果
問題 | No.1446 ハンバーグと納豆ごはん |
ユーザー |
|
提出日時 | 2021-03-31 14:48:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 223 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 62,848 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 21:53:55 |
合計ジャッジ時間 | 1,645 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream>using namespace std;long A,B,N,M;main(){cin>>A>>B>>N>>M;if(A<=B){long ans=A;B-=A;ans+=B/=M+1;cout<<ans<<endl;}else{long ans=B;A-=B;ans+=A/=N+1;cout<<ans<<endl;}}