
数论基础
SHOUXIN11111
这个作者很懒,什么都没留下…
展开
-
Parallelogram Counting (平行四边形计数)
这一题的意思是有n个点,求这些点能组成的平行四边形的个数;这些点任意三点不在同一条直线上;首先给出t组案例;每组n个点;求这n个点能组成的平行四边形的个数;Sample Input260 02 04 01 13 15 17-2 -18 95 71 14 82 09 8Sample OutputCase...原创 2020-02-11 19:44:00 · 573 阅读 · 0 评论 -
GCD - Extreme (II)
题意大概就如代码上所说的,G=0;for(i=1;i<N;i++)for(j=i+1;j<=N;j++){ G+=gcd(i,j);}/*Here gcd() is a function that findsthe greatest common divisor of th...原创 2019-08-18 15:37:21 · 403 阅读 · 0 评论 -
Soldier and Number Game
Two soldiers are playing a game. At the beginning first of them chooses a positive integernand gives it to the second soldier. Then the second one tries to make maximum possible number of rounds. E...原创 2019-08-18 15:59:50 · 177 阅读 · 0 评论 -
Number of Containers
For two integersmandk,kis said to be a container ofmifkis divisible bym. Given 2 positive integersnandm(m<n), the function f(n,m) is defined to be the number of containers ofmwh...原创 2019-08-18 17:07:45 · 361 阅读 · 0 评论 -
Leading and Trailing
You are given two integers:nandk, your task is to find the most significant three digits, and least significant three digits ofnk.InputInput starts with an integerT (≤ 1000), denoting the ...原创 2019-08-11 13:17:07 · 143 阅读 · 0 评论 -
Mathematically Hard
Mathematically some problems look hard. But with the help of the computer, some problems can be easily solvable.In this problem, you will be given two integersaandb. You have to find the summati...原创 2019-08-18 14:20:46 · 305 阅读 · 0 评论 -
GCD and LCM
Given two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L?Note, gcd(x, y, z) means the greatest common ...原创 2019-08-18 15:46:37 · 202 阅读 · 0 评论 -
CodeForces - 512B Fox And Jumping(狐狸和跳跃)
Fox Ciel is playing a game. In this game there is an infinite long tape with cells indexed by integers (positive, negative and zero). At the beginning she is standing at the cell 0.There are alson...原创 2019-09-09 21:26:36 · 270 阅读 · 0 评论