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 ...
随机推荐
- c++ <string.h>中包括哪些常用函数
常用函数如下:strlen 求字符串长度strcmp 比较2个字符串是否一样strcat 字符串连接操作strcpy 字符串拷贝操作strncat ...
- android之listview
首先建立res/layout/data_list.xml: 代码如下: <?xml version="1.0" encoding="utf-8"?> ...
- Reset RequiredFieldValidator 重置 验证控件
<td style="width:100px;">姓名<span class="must_star">*</span>< ...
- 【新产品发布】【iCore2 ARM / FPGA 双核心板】
iCore2是一款包含ARM / FPGA两大利器的双核心板.ARM方面,采用意法半导体高性能的32位Cortex-M3内核STM32F103VE微处理器,主频达72MHz,并包含丰富外设接口.FPG ...
- aggregate运用
测试环境:192.168.1.55 mongo 192.168.1.55:30001show dbsuse gwgps 测试目标,求出两个班的总数,人数,平均分数等. 1. 数据准备db.person ...
- Pull解析器学习
1, package com.service; import java.io.InputStream; import java.io.OutputStream; import java.util.Ar ...
- ecshop lang用法
ecshop lang用法 分类: ECSHOP2013-08-15 16:17 2184人阅读 评论(0) 收藏 举报 ecshop目录下的languages目录.这个是ecshop语言包所在.ec ...
- java MVC架构-spring mvc,struct2(理解)
MVC架构实现基础: 基于filter或者servlet实现请求地址分析,如果需要控制类处理请求,则调用相应的控制类.调用控制类时,根据配置文件初始化控制类相关的参数.数据库连接可持久化存在.控制类处 ...
- 【iTerm2】美化你的Terminal 赠佛祖像
我们开发就是喜欢各种酷炫的东西,对于有洁癖的我,连命令行都不放过了 先上图看效果,命令行显示高亮部分 实现过程: 第一步:.bash_prompt脚本 # ~/.bash_prompt # This ...
- APP 上架苹果应用商城
http://www.360doc.com/content/15/0203/15/19663521_445974056.shtml http://jingyan.baidu.com/article/4 ...