编写题解 2929: 网线主管 摘要:解题思路:定义一个函数用来计算绳子数量,只需要假设最后的输出结果是x,然后采用二分法计算出x的最大值注意事项:此函数的使用条件是在整数的时候,也就是把小数化成了整数,然后采用二分法,这里如何+-1是比…… 题解列表 2022年10月24日 0 点赞 0 评论 395 浏览 评分:0.0
将多位数拆解为单位数,善用整除和求余 摘要:解题思路:注意事项:参考代码:n=input()u=0##for _ in n:## print('_:',_)## if int(_)%2!=0:## u=u…… 题解列表 2022年10月24日 0 点赞 0 评论 334 浏览 评分:0.0
编写题解 1045: [编程入门]自定义函数之整数处理 摘要: #include int main() { int a[10]; int i,min=0,max=0; for(i=0…… 题解列表 2022年10月24日 0 点赞 0 评论 280 浏览 评分:0.0
题目 1029: [编程入门]自定义函数处理素数—常规求解方法 摘要:解题思路:for循环注意事项:统计因子的个数的变量a需要在for循环前初始化参考代码:#include<stdio.h> int main(void) { int i, n,a=0; …… 题解列表 2022年10月24日 0 点赞 0 评论 274 浏览 评分:0.0
吃桃问题(逆向思维找突破) 摘要:解题思路:注意事项:当N=1时,a应该=1所以i应该=i-1参考代码:#include<stdio.h>int main(){ int a=1,N; scanf("%d",&N); …… 题解列表 2022年10月24日 0 点赞 0 评论 315 浏览 评分:0.0
aaaaaaaaaaaaaaaaaaa 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,m; while(~scanf("%d%d",&n,&m)) …… 题解列表 2022年10月24日 0 点赞 0 评论 344 浏览 评分:0.0
求汽水瓶的数量 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int number(int emptyglass){ /*求解空汽水瓶能换多少瓶水*/ int fullglass,all…… 题解列表 2022年10月24日 0 点赞 0 评论 268 浏览 评分:0.0
计算素数和-C语言 摘要:参考代码:#include<stdio.h>int isprime(int x){ int i; if(x==1) { return 0; }else { for(i=2;i<=x;i++) {…… 题解列表 2022年10月25日 0 点赞 0 评论 274 浏览 评分:0.0
二级c语言-计负均正 摘要:解题思路:注意事项:参考代码:#include"stdio.h" int main(){ double sum=0; int ans=0; int d; for(int i=0;i<…… 题解列表 2022年10月25日 0 点赞 0 评论 312 浏览 评分:0.0
计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n; int i=0,j=0; int a[100][100]={0}; i…… 题解列表 2022年10月25日 0 点赞 0 评论 1337 浏览 评分:0.0