結果

問題 No.333 門松列を数え上げ
ユーザー nahcnujnahcnuj
提出日時 2016-01-15 22:38:02
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 564 ms
コンパイル使用メモリ 57,112 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 23:14:32
合計ジャッジ時間 953 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,348 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int A, B;
	cin >> A >> B;
	if (A < B) cout << A-1 + B-A-1 << endl;
	else cout << 2000000000 - A - 1 + A - B - 1 << endl;
	return 0;
}
0