HDU 5752 Sqrt Bo (数论)】的更多相关文章

Sqrt Bo 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5752 Description Let's define the function f(n)=⌊n−−√⌋. Bo wanted to know the minimum number y which satisfies fy(n)=1. note:f1(n)=f(n),fy(n)=f(fy−1(n)) It is a pity that Bo can only use 1 unit…
Sqrt Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2221    Accepted Submission(s): 882 Problem Description Let's define the function f(n)=⌊n−−√⌋. Bo wanted to know the minimum number y wh…
Sqrt Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5752 Description Let's define the function f(n)=⌊n−−√⌋. Bo wanted to know the minimum number y which satisfies fy(n)=1. note:f1(n)=f(n),fy(n)=f(fy−1(n)) It is a pity that Bo can only use 1 unit…
Sqrt Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 980    Accepted Submission(s): 452 Problem Description Let's define the function f(n)=⌊n√⌋. Bo wanted to know the minimum number y which…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5752 题目大意: 定义f(n)=⌊√n⌋,fy(n)=f(fy-1(n)),求y使得fy(n)=1.如果y>5输出TAT.(n<10100) 题目思路: [模拟] 5层迭代是232,所以特判一下层数是5的,其余开根号做.注意数据有0. 队友写的. #include<stdio.h> #include<string.h> #include<math.h> int…
题目:传送门. 题意:一个很大的数n,最多开5次根号,问开几次根号可以得到1,如果5次还不能得到1就输出TAT. 题解:打表题,x1=1,x2=(x1+1)*(x1+1)-1,以此类推.x5是不超过long long的,判断输出即可. #include <iostream> #include <cstdio> #include <cstring> #include <cmath> using namespace std; typedef long long…
七夕节 (HDU - 1215) [简单数论][找因数] 标签: 入门讲座题解 数论 题目描述 七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!" 人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下: 数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6. 你想知道你的另一半吗? Input 输入数据的第一行是一个数字T(1<=T<=500000)…
HDU 1005 Number Sequence(数论) Problem Description: A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n).   Input The input consists of multipl…
Sqrt Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 423    Accepted Submission(s): 188 Problem Description Let's define the function $f(n)=\lfloor \sqrt{n}\rfloor$. Bo wanted to know the m…
Least Common Multiple (HDU - 1019) [简单数论][LCM][欧几里得辗转相除法] 标签: 入门讲座题解 数论 题目描述 The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7…