結果

問題 No.1860 Magnets
ユーザー Nzt3
提出日時 2022-03-04 21:38:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 1,451 ms
コンパイル使用メモリ 166,224 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 19:42:15
合計ジャッジ時間 2,433 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long A,B;
  cin>>A>>B;
  cout<<A+B+max(0ll,max(A,B)-min(A,B)-1)<<'\n';
}
0