最喜欢的数字7
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.
题目描述
阿文在0-9的数字中最喜欢数字7,并且不喜欢其他数字和7连在一起,现在阿文有一个数n,他想知道n中有多少个数字7,以及会将这个数中的7全部拿掉然后重组成一个新数,你能帮帮他吗?
输入格式
输入共一行,一个整数 n。
输出格式
输出共两行,第一行为n中7的个数,第二行为将n中7拿掉后重组成的新数
输入 #1
789071
输出 #1
2
8901
说明/提示
样例解释
对于样例 1,输入 789071 中有两个 7,将7拿掉后重组成的数为8901。
数据范围
保证 0≤n≤1018。
语法组5月月赛
- Status
- Done
- Rule
- IOI
- Problem
- 5
- Start at
- 2026-5-24 19:00
- End at
- 2026-6-2 23:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 13