摘要: 002 模拟+找规律 规律就是上面正三角第i行是i*2-1个符号 正三角的符号数为t,整个沙漏的符号数为t*2-1 #include <bits/stdc++.h> using namespace std; int n , m , t = 0; char ch; int main() { cin > 阅读全文
posted @ 2022-03-02 20:23 PHarr 阅读(38) 评论(0) 推荐(0) 编辑
摘要: B2142 求 1+2+3+...+N 的值 就是用高斯公式 #include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; cout << (n+1)*n/2 << endl; } B2112 石头剪子布 没有 阅读全文
posted @ 2022-03-02 20:19 PHarr 阅读(136) 评论(0) 推荐(0) 编辑