自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 2020-12-09

大一新生周训练赛 题目描述: Given an integer n, we only want to know the sum of 1/k2 where k from 1 to n. Input There are multiple cases. For each test case, there is a single line, containing a single positive integer n. The input file is at most 1M. Output The requir

2020-12-09 19:23:07 135

原创 2020-12-08

大一周训练赛E题 Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS

2020-12-08 20:28:37 63

原创 2020-12-08

大一周训练赛L题 题意:给你一个正整数n,判断从1到n有多少个素数。 思路:这道题用最简单的方法是写不出来的,这会超时,所以需要你优化算法,具体优化见AC代码。 错误代码1: #include<stdio.h> #include<math.h> #include<string.h> bool judgeprime(long long digit) { if(digit2||digit3) return true; else if(digit<=1||digit%20

2020-12-08 20:08:57 147

原创 2020-12-08

大一周训练I题 题意:xx举行了一个生日派对,收到一个nn的棋盘,棋盘按如图所示闪光,每秒闪一次,问s秒后闪光点的坐标。 解题思路:通过观察可以发现,n^2一定在棋盘的最下边或最左边,通过观察可知偶数的平方在最下边,奇数的平方在最左边。且每个数开根号都有一定的规律。(本题重在找规律) 错误代码:在这里插入代码片 #include<stdio.h> #include<math.h> #include<string.h> int main() { int n,count=0;

2020-12-08 19:42:45 78

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除