結果

問題 No.1860 Magnets
ユーザー 👑 CleyL
提出日時 2023-03-25 22:48:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 525 ms
コンパイル使用メモリ 65,792 KB
最終ジャッジ日時 2025-02-11 18:06:20
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int a,b;cin>>a>>b;
    int ans = a+b;
    if(a!=b)ans += abs(a-b)-1;
    cout << ans << endl;
}
0