The Luckiest number(hdu 2462)】的更多相关文章

给定一个数,判断是否存在一个全由8组成的数为这个数的倍数 若存在则输出这个数的长度,否则输出0 /* 个人感觉很神的一道题目. 如果有解的话,会有一个p满足:(10^x-1)/9*8=L*p => 10^x-1=9*L*p/8 设m=9*L/gcd(L,8) 则存在p1使得 10^x-1=m*p1 => 10^x=1(mod m) 根据欧拉定理 10^φ(m)=1(mod m) 所以x一定是φ(m)的因数(这好像是某个定理). */ #include<iostream> #incl…
hihoCoder #1432 : JiLi Number(吉利数) 时间限制:1000ms 单点时限:1000ms 内存限制:256MB Description - 题目描述 Driver Ji likes the digit "1". He has an accumulator which shows the sum of input number. He lists all of positive number no more than N and starts counting…
//1088(参考博客:http://blog.csdn.net/libin56842/article/details/8950688)//1.编写一个浏览器输入输出(hdu acm1088)://思路:对已经输入的字符串进行处理,遇到<br><hr>分别进行处理.遇到多于80个字符(统计该行的长度)或者<br>或者结束,则换行:遇到<hr>,输出80个'-'.#include<stdio.h>#include<string.h>#d…
1117 Eddington Number (25 分) British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one ri…
1038 Recover the Smallest Number (30 分) Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover many numbers such like 32-321-3214-0229-87 or 022…
1019 General Palindromic Number (20 分) A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers. Although…
1144 The Missing Number(20 分) Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains one test case. For each case, the first line gives a positive integer…
相关文章 简书原文:https://www.jianshu.com/p/9fb573ef10da 数据类型总结——概述:https://www.cnblogs.com/shcrk/p/9266015.html 数据类型总结——String(字符串类型):https://www.cnblogs.com/shcrk/p/9277107.html 数据类型总结——Number(数值类型):https://www.cnblogs.com/shcrk/p/9277040.html 数据类型总结——Bool…
1 你看 number(4,3)是表示 这个数 一共有4位是有效位,后面的3 表示有3个是小数也就是这个数 只能是1.234,这样格式的 最大只能是9.999,2 number(3,4) 表示这个数 有效位数是3位 但是有四位小数 也就是只能是这个格式0.0123最大只能是0.0999:3 number(3,-3) 就是这个数有效位数一共3位,如果是正3 则是3位小数 如果是负数的话就是3 位整数 也就是123这个格式 最大只能是999.4 还有这样的 number(2,-3) 就是这个数的有效…
The Luckiest number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1163    Accepted Submission(s): 363 Problem Description Chinese people think of '8' as the lucky digit. Bob also likes digit '…