[编程入门]自定义函数之数字分离 题解 摘要:解题思路:这题可以把四位数看做一个字符串,带人自定义函数,边输出字符边输出空格。注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;strin…… 题解列表 2022年05月04日 0 点赞 0 评论 338 浏览 评分:4.7
宏定义之闰年判断 摘要:解题思路:大家都知道判断闰年要要求%4==0,%100==0,%400==0;注意事项:L,N是大写参考代码:#include<bits/stdc++.h>using namespace std;in…… 题解列表 2022年05月06日 0 点赞 0 评论 345 浏览 评分:4.7
亲和数题解(C语言代码)一目了然 别忘点赞哦-.- 摘要:解题思路:1.设输入的数为a,b;2.求出a的真约数的和suma;3.判断suma是否等于b,若不等于直接输出NO,结束;4.若suma等于b,求出b的真约数的和sumb;5.判断sumb是否等于a,…… 题解列表 2022年05月18日 0 点赞 1 评论 314 浏览 评分:4.7
开心的金明-C语言 摘要:解题思路: 典型0/1背包问题,套用0/1背包问题公式sum[i][j]=max(sum[i-1][j],sum[i-1][j-v[i]]+p[i]*v[i])即可。总钱数N代表背包容量,物品…… 题解列表 2022年08月19日 0 点赞 0 评论 503 浏览 评分:4.7
新手写的 所以对新手很友好 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n; while (scanf("%d", &n) ) { …… 题解列表 2022年09月30日 0 点赞 0 评论 537 浏览 评分:4.7
与圆相关的计算c语言 摘要:解题思路:暴力求解,输入半价a,直径为2*a,周长为2*3.14159*a,面积为3.14159*a*a注意事项:1)程序中的乘法用*号 2)π在这取3.14159不然会错误…… 题解列表 2022年10月20日 0 点赞 2 评论 758 浏览 评分:4.7
典型的动态规划 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define maxn 10010#define mod 1000000007in…… 题解列表 2022年11月05日 0 点赞 0 评论 605 浏览 评分:4.7
只是写写注意事项 摘要:解题思路:注意事项:参考代码:int main(){ printf("Hello, World!"); return 0;}//注意要写一个空格在逗号后面…… 题解列表 2022年11月08日 0 点赞 0 评论 479 浏览 评分:4.7
编写题解 2999: 牛吃牧草 摘要:解题思路:先把可能算出来 for (int i = 1; i <= 500; i++) for (int j = 1; j <= 500; j++) 题解列表 2022年11月21日 0 点赞 0 评论 1197 浏览 评分:4.7
2772: 苹果和虫子 摘要:解题思路:注意事项:参考代码:import mathn, x, y = map(int,input().strip().split())print(math.floor(n - y / x)) …… 题解列表 2022年11月26日 0 点赞 0 评论 618 浏览 评分:4.7