No.1883 SLASH
問題文最終更新日: 2022-02-04 20:17:23
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 337
(順位表)
の他の問題:
Problem Statement
Distinct integers $a, b, c$, each between $0$ and $9$ inclusive, are given concatenated in this order.
Let $M$ be the largest and $m$ be the smallest of $a, b, c$. Find the value of $M - m$.
Input
$abc$
- $a, b, c$ are distinct integers between $0$ and $9$ inclusive
- There are no spaces between $a, b, c$
Output
Print the value of $M - m$. Add a newline at the end.
Sample
Sample 1
Input
168
Output
7
Since $M = 8, m = 1$, we have $M - m = 7$.
Sample 2
Input
053
Output
5
It is possible that $a = 0$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
miscalc
magsta