Docoding OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
4260: 【入门】最大数和最小数的差
Memory Limit:16 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:53
Solved:36
Submit
Submit Record
Statistics
ShowOff!
Description
从键盘读入一个三位正整数n,请问这个三位正整数的个位、十位、百位中,最大数和最小数的差值是多少? 比如:读入123,那么差值是3 - 1 = 2,再比如:读入863,那么差值 = 8 - 3 = 5。
Input
一个三位的正整数n。
Output
这个三位数最大数和最小数的差值。
Sample Input
Copy
123
Sample Output
Copy
2
Source/Category
分支
多分支
Submit
Submit Record
Statistics
ShowOff!