結果

問題 No.333 門松列を数え上げ
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-06-11 13:16:33
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 2,824 ms
コンパイル使用メモリ 68,340 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 02:55:50
合計ジャッジ時間 3,423 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import strutils, sequtils, math

const
  D = 2 * 10 ^ 9
let
  AB = stdin.readLine.split.map parseInt
  (A, B) = (AB[0], AB[1])
var
  ans = 0

if A > B:
  ans += D - A
  ans += A - B - 1
else:
  ans += A - 1

echo ans
0