結果

問題 No.1860 Magnets
ユーザー SSRS
提出日時 2022-03-04 21:22:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 1,969 ms
コンパイル使用メモリ 192,588 KB
最終ジャッジ日時 2025-01-28 04:43:37
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A, B;
  cin >> A >> B;
  long long ans = (long long) (A + B) * 2;
  if (A < B){
    swap(A, B);
  }
  ans -= B * 2;
  ans--;
  cout << ans << endl;
}
0