よじろめ覚書

私の理解度重視のソースコードです。

2019-05-26から1日間の記事一覧

ABC013B - 錠

ABC

問題:B - 錠 #include <algorithm> #include <cmath> #include <cstdio> #include <iostream> using namespace std; int main(void) { int a, b; scanf ("%d", &a); scanf ("%d", &b); printf ("%d\n", min(abs(b - a), 10 - abs(b - a))); return 0; }</iostream></cstdio></cmath></algorithm>