- 博客(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
空空如也
引发了异常: 写入访问权限冲突。 store 是 0x1920111。请问如何解决?
2021-11-30
TA创建的收藏夹 TA关注的收藏夹
TA关注的人