Tìm chữ số MIN MAX

View as PDF

Submit solution

Points: 0.10
Time limit: 1.5s
Memory limit: 64M
Input: stdin
Output: stdout

Authors:
Problem type
Mô tả vấn đề

Viết chương trình nhập số nguyên không âm n, tìm chữ số nhỏ nhất và lớn nhất của n.

Example: n= 10293 → Print out 9, 0

Input

Nhập số nguyên n (1 ≤ n ≤ 10~^9~)

Output

In ra chữ số lớn nhất và nhỏ nhất

Sample Input 1
10293
Sample Output 1
9 0

Comments

Please read the guidelines before commenting.


There are no comments at the moment.