B. Divisors of Two Integers】的更多相关文章

B. Divisors of Two Integers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently you have received two positive integer numbers xx and yy. You forgot them, but you remembered a shuffled…
Recently you have received two positive integer numbers xx and yy. You forgot them, but you remembered a shuffled list containing all divisors of xx (including 11 and xx) and all divisors of yy (including 11 and yy). If dd is a divisor of both number…
C. Primes on Interval time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positi…
Primes on Interval Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 237C Appoint description:  System Crawler  (2016-04-26) Description You've decided to carry out a survey in the theory…
题目: Description You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has exactly two distinct positive integer divisors. Consider positive integers a, a + 1, ..., b (a ≤…
CF1108A. Two distinct points 做法:模拟 如果两者左端点重合就第二条的左端点++就好,然后输出左端点 #include <bits/stdc++.h> using namespace std; int T; int l1, r1, l2, r2; int main() { scanf("%d", &T); while(T--) { scanf("%d%d%d%d", &l1, &r1, &l2,…
Codeforces Round #535 (Div. 3) 题目总链接:https://codeforces.com/contest/1108 太懒了啊~好久之前的我现在才更新,赶紧补上吧,不能漏掉了. A. Two distinct points 题意: 给出两个区间的左右边界,输出两个数,满足两个数分别在两个区间内且这两个数不相等. 题解: 直接输出左端点然后判断一下就行了. 代码如下: #include <bits/stdc++.h> using namespace std; type…
hhhh感觉我真的太久没有接触过OI了 大约是前天听到JK他们约着一起刷codeforces,假期里觉得有些颓废的我忽然也心血来潮来看看题目 今天看codeforces才知道居然有div3了,感觉应该看名字比div2还要简单吧,于是我就做了做....发现确实还蛮简单的hhhh 但是我又突发奇想,干脆更新一篇博客吧,毕竟这也是我少有的能刷完一整套CF的题,那也可以记录一下啦...(虽然div3的题解似乎拿来充当一个题解还是有点水的hhhh) A - Two distinct points 题目大意…
Problem A. Two distinct points [题解] 显然 , 当l1不等于r2时 , (l1 , r2)是一组解 否则 , (l1 , l2)是一组合法的解 时间复杂度 : O(1) [代码] #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <typena…
Problem: Codeforces 1139D Analysis: After ACing E, I gave up D and spent the left 30 minutes chatting with Little Dino. Let \(f[n]\) be the expected number of steps needed to make the greatest common divisor (gcd) become \(1\) when the gcd is \(n\) n…