B. Code For 1 time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Jon fought bravely to rescue the wildlings who were attacked by the white-walkers at Hardhome. On his arrival, Sam tells him t…
cf1189div2解题报告 codeforces A 答案要不是一串要不就是去掉最后一个字母的两串 #include <bits/stdc++.h> #define ll long long using namespace std; const int N=107; int a[N<<2],n; int main() { scanf("%d",&n); int js=0; for(int i=1;i<=n;++i) { scanf("%…
题目链接:http://codeforces.com/problemset/problem/476/C 题目意思:给出两个数:a 和 b,要求算出 (x/b) / (x%b) == k,其中 k 的取值范围是 [1, a],找出满足所有正整数的 x 并求出所有 x 的和. 是不是觉得无从下手呢?我当时也是 = = .....看了整晚题解,算是看懂了... 首先设 d = x / b, m = x % b,那么整条式子就变成 d/m = k —> d = mk(1) (好快你就知道有啥用了…