不含7 Unlucky 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.

题面描述

给定一个正整数 nn,求出 11nn 中有多少个数满足:该数在十进制下和八进制表示下均不含 77

输入格式

输入以以下格式从标准输入给出:

N N

输出格式

输出一个代表答案的整数。

样例 #1

样例输入 #1

20

样例输出 #1

17

样例 #2

样例输入 #2

100000

样例输出 #2

30555

提示

  • 1  N  105 1\ \leq\ N\ \leq\ 10^5
  • N N 为整数

一起比赛欢乐多

Not Attended
Status
Done
Rule
Ledo
Problem
22
Start at
2024-7-29 19:00
End at
2024-7-29 21:00
Duration
2 hour(s)
Host
Partic.
0