题解列表

筛选

C语言-报数问题 简单数组法

摘要:解题思路: 题设要求输入一个正整数n,即表示n个人围成一圈,且分别编号1~n,由编号为1的人开始从1到3报数,报到3的人退出,那么最后只会留下一个人,求这个人的编号。 这里所有人是围成一……

编写题解 2842: 大整数减法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int maxmine= 210;    int a[maxmine]……

1253: 老王赛马

摘要:```cpp #include #include using namespace std; int main() { int n,i,j,a[1024],b[1024],x,cou……

1254: 考试排名

摘要:```cpp #include #include using namespace std; typedef struct BSTree *BST; struct BSTree { ……

1256: 诡秘的余数

摘要:```cpp #include #include using namespace std; int main() { char x[2000]; int n; ……

1257: 超级楼梯

摘要:```cpp #include using namespace std; int total; int sum(int step,int m) { if(step>m) ……

2812: 球弹跳高度的计算

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std ;int main (){  double h,sum;  cin>>h;   //输入初始高……

点和正方形的关系

摘要:解题思路:用数学知识就可以了,点到正方形中心的距离小于或等于时点就在正方形内注意事项:参考代码:#include<stdio.h>int main(){     int x,y;     scanf(……

1258: 连续自然数和

摘要:```cpp #include using namespace std; int main() { long long n,i,j; while(cin>>n) ……