好数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
称一个正整数为好数,当且仅当它的所有数位从左往右不增或不降(特别地,一位数也为好数)。
如 都是好数,但是 都不是。
现在给你一个好数,询问它是从小到大的第几个好数。
输入格式
第一行一个正整数 ,表示数据组数。
接下来 行,一行一个好数 。
输出格式
行,每行一个数表示答案。
4
1
9
15
125
1
9
15
114
数据规模与约定
对于 的数据,。
对于另 的数据,。
对于另 的数据,。
对于 的数据,。
2025 练习赛 1
- Status
- Done
- Rule
- IOI
- Problem
- 7
- Start at
- 2025-10-18 0:00
- End at
- 2025-10-20 0:00
- Duration
- 48 hour(s)
- Host
- Partic.
- 53