競プロで使いたいのですが
if i = 0 then return 0
elif i > 0 then return i - 1
を出来るだけ早く求めるには何かいい方法ありますかね?
ビット演算とかでなんとかなりませんかね?