自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 问答 (2)
  • 收藏
  • 关注

原创 出现错误:fatal: unable to access Failed to connect to github.com port 443

#git push -u origin main出现错误。 fatal: unable to access 'https://github.com/xxx/xxxx.git/': Failed to connect to github.com port 443 after 21162 ms: Couldn't connect to server

2022-12-23 11:41:44 846 1

原创 用筛法求之N内的素数。

#include<iostream> using namespace std; int main() { int n;//输入上界 cin >> n; for (int i = 2; i <= n; i++)//双层循环 { int j = 2; for (; j < i; j++) { if (i% j == 0)break;//可以被整除,说明不是素数 } if (i == j)cout << i<<end.

2022-01-18 09:30:00 97

原创 2022.1.15刷题 之The 3n + 1 problem,蛇形矩阵,扫雷

刷的好慢啊,有很多都不会 The 3n + 1 problem #include<iostream> using namespace std; #include<string.h> int main() { int i, j, k, max, n, len, t; while (cin >> i >> j) { //cout << i << " " << j << " "; if (i &

2022-01-15 14:54:27 166

原创 2022.1.14学到了一点以前不知道的

1. s为字符串类型,n为整数类型 s=s+n;会报错 s+=n;不会 2. cin.getline() 可以接受字符串 例如: char m[20]; cin.getline(m,5); cout<<m<<endl; 输入:hhhhhhhhh 输出:hhhh cin.getline()实际上有三个参数,cin.getline(接收字符串的变量,接收字符个数,结束字符) 当第三个参数省略时,系统默认为'\0' 3. getline() string

2022-01-15 11:16:05 96

原创 母牛的故事2022.1.13

如果有一头牛的话,第2年多一头 +1,第4年+3+1,因为母牛的第一条小牛也可以生,第五年+4+1+1 num[1]=1; num[2]=2 num[3]=3; num[4]=3+1 得到核心要点:num[i]=num[i-1]+num[i-3] #include<iostream> using namespace std; int main() { int n, i; int f[55] = { 0,1,2,3 }; for (i = 4; i <

2022-01-13 22:54:51 171

空空如也

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

TA关注的人

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