我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

B-number 数字的算法

Problem Description
A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example, 130 and 2613 are wqb-numbers, but 143 and 2639 are not. Your task is to calculate how many wqb-numbers from 1 to n for a given integer n.

Input
Process till EOF. In each line, there is one positive integer n(1 <= n <= 1000000000).

Output
Print each answer in a single line.

Sample Input
13
100
200
1000

Sample Output
1
1
2
2

近期文章

  • Celestial Being
  • Draw Regular Polygon 多边形
  • How many words 计算有多少单词
  • Identify the number 数字的组合问题
  • Alice and Bob's Trip
  • Assignments 分配的问题
  • Seaside 海边的计算问题
  • 3D Convex Hull 是如何实现的
  • Power Stations 电站的问题
  • Permutation Counting 回文的计算
  • Volume 容积的问题
  • THE MATRIX PROBLEM 矩阵的问题
  • 用C 语言来实现数值统计
  • Showstopper 代码编写
  • 请问在windows 10的64系统当中可以用的C语言开发工具是什么比较好
  • 英特尔的CUP哪一种适合turbo c语言?是X3220好还是52640v2比较好?
  • C语言的程序的编写,用turbo c的话,怎么才能支持windows 10的64的系统?
  • 请问用Inter X3220这种CUP流畅么?
  • 在完成一个验证码登录案例的时候,虽然编译可以通过,但是重定向的设置参数和获取参数的波浪线是因为什么啊,并且提示class or interface expected
  • 请问如何让手机端与电脑端看到的网页相同。

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华