摘要:
思路: A+B, 没有什么特别的. 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 ios::sync_with_stdio(false); 7 cin.tie(0); 8 9 int a, b; 10 cin >> 阅读全文
摘要:
思路: 1 ≤ n ≤ 1,000,000,000,需要用long long存. 1 #include <iostream> 2 using namespace std; 3 typedef long long ll; 4 5 int main() 6 { 7 ios::sync_with_stdi 阅读全文
摘要:
思路: 求圆的面积: S = PI * r2. 题目已给 PI = atan(1.0) * 4 或 PI=3.14159265358979323. 1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 using namespa 阅读全文
摘要:
思路: 直接打表, fib[n]即为所求. 注意取模运算的规则: (a + b) % c = (a % b + b % c) % c 1 #include <iostream> 2 using namespace std; 3 4 int fib[1000005]; 5 6 int main() 7 阅读全文