C++训练-8除不尽的数,--------直接输出答案不就可以了 摘要:解题思路:直接输出答案就可以了,注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout << 1993 << en…… 题解列表 2022年01月27日 0 点赞 4 评论 763 浏览 评分:7.3
顺便练习一下函数 摘要:#include<stdio.h> int fun(int n) { int ret; if ( n%2==0 ) { ret=n/2; printf("%d/2=%d\n…… 题解列表 2022年01月27日 0 点赞 0 评论 308 浏览 评分:9.9
有规律的数列求和(C语言代码) 摘要:####解题思路: ``` 2/1 + 2/3 + 5/3 + 5/8 + 13/8 + 21/13 + …… Sn = Y1/X1 + Y2/X2 + Y3/X3 + Y4/X4 + …… +…… 题解列表 2022年01月27日 0 点赞 0 评论 318 浏览 评分:9.9
划划水啦~~~ 摘要:解题思路:循环嵌套,规定步长注意事项:sum的归零参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); …… 题解列表 2022年01月27日 0 点赞 0 评论 778 浏览 评分:9.9
短小精悍 T^T 摘要:#include<stdio.h> int main() { int n; while (scanf("%d",&n)&&n) { int sum=…… 题解列表 2022年01月27日 0 点赞 0 评论 1375 浏览 评分:9.5
1085: A+B for Input-Output Practice (I) 摘要:解题思路:这题其实谁都会做,主要是要看出题目里的要求:“with one line of output for each line in input”,也就是要用EOF来结束注意事项:输出时别忘记换行…… 题解列表 2022年01月27日 0 点赞 4 评论 1222 浏览 评分:9.9
优质题解 python-01背包 摘要:解题思路:①建立一个存放物品的n*2大小的数组commodities[n+1][2],commodities[i][0]表示第i个物品的重量,commodities[i][1]表示第i个物品的价值。②…… 题解列表 2022年01月27日 0 点赞 0 评论 797 浏览 评分:9.9
[STL训练]Let the Balloon Rise java语言 摘要:解题思路:我的解题思路是:先创建两个数组,一个为字符串型数组,另一个为整型数组。然后进行双重for循环,设置i和j变量(你也可以理解为C语言中的指针),后面的我就用指针来解释啦~(即使java中没有指…… 题解列表 2022年01月27日 0 点赞 0 评论 438 浏览 评分:9.9
1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:m是大于0的;当m=1时;t=1;当m>1时;t=1-1/(2*2)-1/(3*3)-...-1/(m*m);t赋初值1;定义t和i为double类型,输出结果需要带6位小数;注意事项:定义…… 题解列表 2022年01月27日 0 点赞 0 评论 345 浏览 评分:0.0
这题有个小细节--(两种写法) 摘要:```cpp //第一种写法,可运行 #include #include #include #include #include using namespace std; int mai…… 题解列表 2022年01月27日 0 点赞 0 评论 387 浏览 评分:8.0