UVA 10127题目描述
Given any integer 0 ≤ n ≤ 10000 not divisible
by 2 or 5, some multiple of n is a number which
in decimal notation is a sequence of 1’s. How
many digits are in the smallest such a multiple
of n?
Input
A file of integers at one integer per line.
Output
Each output line gives the smallest integer x > 0
such that p =
∑x−1
i=0 1×10i = a×b, where a is the
corresponding input integer, and b is an integer
greater than zero.
Sample Input
3
7
9901
Sample Output
3
6
12
UVA 10127题目描述的更多相关文章
- UVA 10127题目的解答
#include <iostream>#include <cstdio>#include <cmath> int main(){ int num; while (s ...
- uva 10127 - Ones(数论)
题目链接:uva 10127 - Ones 题目大意:给出n,问说者少要多少为1才干够整除n. 解题思路:等于是高精度取模,直到余数为0为止. #include <cstdio> #inc ...
- 通过vjudge刷Uva的题目(解决Uva网站打开慢的问题)
最近在跟着算法竞赛入门经典刷题,发现Uva网站打开超级慢,进个主页面都需要好几秒.后来发现可以通过vjudge网站刷Uva的题目,很是方便,在这mark一下,顺便做一下推荐. vjudge网址:htt ...
- 【数论,水题】UVa 10127 - Ones
题目链接 题意:给你一个数n,问最少有多少个1构成的“1”串(1,11,...)能整除n; 比如:111能被3整除: 111111能被7整除:... 作为水货觉得只要自己能1A的都是水题=. = #i ...
- 题目描述: k一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法。
时间限制:1秒 空间限制:32768k 斐波那契数列指的是这样一个数列: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,377,610,9 ...
- POJ 1035题目描述
Description You, as a member of a development team for a new spell checking program, are to write a ...
- POJ 1028题目描述
Description Standard web browsers contain features to move backward and forward among the pages rece ...
- Eugeny and Array(水题,注意题目描述即可)
Eugeny has array a = a1, a2, ..., an, consisting of n integers. Each integer ai equals to -1, or to ...
- 最小栈问题:题目描述:设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。
MinStack minStack = new MinStack();minStack.push(-2);minStack.push(0);minStack.push(-3);minStack.get ...
随机推荐
- iOS -- MVC的理解
今天在写项目的时候困惑了一下 我在写一个应用的主界面,其实是很简单的,上面有几个控件,我在想把空间写到viewController里会不会有点冗杂 后来查了一下,发现貌似也不需要分开写,毕竟界面好简单 ...
- salt执行报错一例
执行报错: 查看服务端日志: 认证有问题 重新认证吧!!! minion端: [root@super66 ~]# cd /etc/salt/[root@super66 salt]# lsminion ...
- CVE-2014-4113 windows通杀本地提权0day
这个0day的发现挺有意思的,是老外CrowdStrike 发现的,被老外监测程序发现显示从WEBSHELL使用Win64.exe来提升权限. 原文地址:http://blog.crowdstrike ...
- Ubuntu 14.04 使用的一些笔记
1. 今天下载了安卓的2.3.5的源代码,解压tar的时候,发现一个错误中断了解压过程: could not create the hard link file, 看了一下基本上都是每个主目录下的 . ...
- jQuery.qrcode.js客户端生成二维码,支持中文并且可以生成LOGO
描述: jquery.qrcode.js 是一个能够在客户端生成矩阵二维码QRCode 的jquery插件 ,使用它可以很方便的在页面上生成二维条码.此插件是能够独立使用的,体积也比较 ...
- Jenkins学习记录
参考资料 官方文档 用MSBuild和Jenkins搭建持续集成环境(1) 用MSBuild和Jenkins搭建持续集成环境(2) 构建基于Jenkins + Github的持续集成环境 Jenkin ...
- UIbutton 圆角和边线
#define WhiteColor [UIColor whiteColor]#define YellowColor Color_RGB(253,131,42,1)//主题黄#define Font ...
- 解决电脑访问Discuz!手机版(支持触屏版)
discuz电脑访问手机版的方法现在需要来修改一下2个文件,即可用电脑浏览discuz的手机版本:找到./source/function/function_core.php 文件,查找 : funct ...
- IDM 通过防火墙规则阻止激活验证
1. 打开Windows防火墙 2. 高级设置-->出站规则-->新建规则 3. 添加IDM程序路径,阻止连接 4. 在属性中添加作用域,远程IP地址: DNS解析出IP:register ...
- Bootstrap页面布局7 - Bootstrap响应式布局的实用类
在bootstrap-responsive.css这个CSS样式表中已经为我们设定好了几个实用的类: .visible-phone: 在智能手机设备上显示这个元素,在其他设备上隐藏该元素 .visib ...