Asimple
Asimple
全部文章
分类
LeetCode(2)
未归档(188)
归档
标签
去牛客网
登录
/
注册
Asimple的博客
一个学渣的学习记录笔记
全部文章
(共12篇)
初涉数论
题目描述 对于给定的 x , 求出使得 x^y%mod = 1 的最小正整数y , 其中 mod = 790660457 . 输入 多组输入(最多50000组 ) 每组一个x ( 0 < x < mod ) ...
数论
2017-01-05
0
519
Kattis之旅——Perfect Pth Powers
We say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is ...
Kattis
数论
2017-04-25
0
1015
Kattis之旅——Inverse Factorial
题目意思就是已知n的阶乘,求n。 当输入的阶乘小于10位数的时候,我们可以用long long将字符串转化成数字,直接计算。 而当输入的阶乘很大的时候,我们就可以利用位数去大概的估计n。 //Asimple #include <bits/stdc++.h> using na...
Kattis
数论
2017-04-26
0
732
Kattis之旅——Factovisors
The factorial function, n! is defined thus for n a non-negative integer: 0! = 1 n! = n * (n-1)! (n > 0) We say that a divides b if t...
Kattis
数论
2017-04-27
0
730
Kattis之旅——Chinese Remainder
InputThe first line of input consists of an integers T where 1≤T≤1000, the number of test cases. Then follow T lines, each containing four integers a,...
Kattis
数论
2017-04-28
0
1016
Kattis之旅——Fractional Lotion
Freddy practices various kinds of alternative medicine, such as homeopathy. This practice is based on the belief that successively diluting some subst...
Kattis
数论
2017-04-28
0
707
Kattis之旅——Prime Reduction
A prime number p≥2 is an integer which is evenly divisible by only two integers: 1 and p. A composite integer is one which is not prime. The fundament...
Kattis
数论
2017-04-29
0
775
How many zero's and how many digits ? UVA - 10061
Given a decimal integer number you will have to find out how many trailing zeros will be there in itsfactorial in a given number system and also you w...
数论
UVA
ACM
2017-08-21
0
751
Cheerleaders UVA - 11806
题目大意是: 在一个m行n列的矩形网格中放置k个相同的石子,问有多少种方法?每个格子最多放一个石子,所有石子都要用完,并且第一行、最后一行、第一列、最后一列都要有石子。 容斥原理。如果只是n * m放石子,那么最后的结果,就是C(n*m,k).我们设A为第一行不放石头的总数,B为最后一行不放...
思维
数论
2017-08-22
0
643
Always an integer UVALive - 4119
题目很简单,就是求表达式(P/D)的结果是不是整数。其中P是一个整系数的多项式,D是一个正整数。 把1-k(最高次)+1都试一次就好了。结论可以总结归纳得到。(k取 0, 1, 2 .... 的情况推一次,可以推出结论)。 // Asimple #include <iostream&...
数论
UVA
ACM
2017-08-23
0
466
首页
上一页
1
2
下一页
末页