[编程入门]自定义函数之数字后移-简单方法 摘要:解题思路:通过将后m位赋值给一个新数组b的前m-1位,在将数组剩余的前n-m赋值给新数组的后m位注意事项:注意j的值参考代码:#include<stdio.h>int main(){ int a[10…… 题解列表 2023年07月22日 0 点赞 0 评论 358 浏览 评分:0.0
用 for(auto & c:s)遍历字符串并赋值 摘要:解题思路: 字符串遍历注意事项: getline取空格参考代码:#include<iostream>#include<cstring>using na…… 题解列表 2023年07月23日 0 点赞 0 评论 376 浏览 评分:9.9
1045 暴力解 摘要:#include<iostream>using namespace std;int s[10];int a,b;int da=0,xiao=10050;int main(void){ for(i…… 题解列表 2023年07月23日 0 点赞 0 评论 398 浏览 评分:9.9
1199: 哥德巴赫曾猜测 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int add(int n){ for(int i=2;i<n;i++) if(n…… 题解列表 2023年07月23日 0 点赞 0 评论 362 浏览 评分:9.9
想看奥本海默 摘要:#include<iostream>#include<cmath>using namespace std;int main(void){ float x,x1=1.00; float a;…… 题解列表 2023年07月23日 0 点赞 0 评论 355 浏览 评分:9.9
使用for循环计算2的幂 摘要:因为懒得导入math.h库,就使用for循环写 ```c #include int main() { int n,s=1,i; scanf("%d",&n); f…… 题解列表 2023年07月23日 0 点赞 0 评论 814 浏览 评分:9.9
2778: 判断数正负 摘要:```c #include int main() { int n; scanf("%d",&n); if(n>0) printf("positive");…… 题解列表 2023年07月23日 0 点赞 0 评论 391 浏览 评分:0.0
利用列表解决 摘要: n=int(input()) #sb出题人,玩过牌没有,你家扑克牌里有1没A吗,这牌是你搁nm屁眼里抠出来吧 list1=['1','2','3','4','5','6','7'…… 题解列表 2023年07月23日 0 点赞 4 评论 310 浏览 评分:9.9
超级楼梯使用动态规划算法,C++实现! 摘要:# 动态规划 ```c++ #include #include using namespace std; const int N = 100010; int n, m; int…… 题解列表 2023年07月23日 0 点赞 0 评论 438 浏览 评分:0.0
C++ STL next_permutation 摘要:# STL `next_permutation` ```c++ #include #include #include using namespace std; int main(…… 题解列表 2023年07月23日 0 点赞 0 评论 366 浏览 评分:0.0