1118: Tom数 (C) ```c#include#includeintmain(void){longlonglen,num,sum=0;inti;while(~scanf("%lld",&num))//使用ctrl+z结束输入{sum=0;for(len=0;num/(longlong)pow(10, 题解列表 2022年11月30日 0 点赞 1 评论 1006 浏览 评分:9.9
C语言 结构体之时间设计& 摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct calendar{ int year; int month; int day;}date, * p;…… 题解列表 2022年11月30日 0 点赞 0 评论 510 浏览 评分:9.9
队列思想,模拟思想,C / C++ 摘要: C++版 #include #include using namespace std; int main() { int n, m; while(cin >> n >> …… 题解列表 2022年12月01日 0 点赞 0 评论 499 浏览 评分:9.9
题解 2970: 计算两个日期之间的天数 ###题解2970:计算两个日期之间的天数##解题思路使用一个固定的日期作为参考日期(我选则的是公元1年1月1日)计算两个日期分别相对于这个日期的差值,计算两个差值计算日期时,优先计算该日期的年份的一月一日距离参考日期的天数,再计算月份日期```javaimportjava.util.Scanner; 题解列表 2022年12月01日 0 点赞 0 评论 861 浏览 评分:9.9
01背包(动态规划) 解题思路:动态规划对于01背包问题选择方法的集合可以分成2种:①不选第i个物品,并且总体积不大于j的集合所达到的最大值:f[i-1][j]②选择1~i个物品,并且总体积不大于j的集合所达到的最大值f[i][j]对于第二种情况我们很难计算,因此需要思考从另一个角度解决问题。 题解列表 2022年12月01日 0 点赞 0 评论 885 浏览 评分:9.9
2789: 骑车与走路 摘要:解题思路:注意事项:参考代码:a = int(input())if a / 3 + 50 < a / 1.2: print('Bike')elif a / 3 + 50 == a…… 题解列表 2022年12月01日 0 点赞 0 评论 717 浏览 评分:9.9
1040: [编程入门]实数的打印 最简方法 摘要:解题思路:简单的输入输出问题,首先定义float类型,然后输入,并按要求输出。注意事项:1.由题意输入为float类型,输入scanf注意%f。2.输出部分 “6.2f”格式是指数字整体长度包括小数点…… 题解列表 2022年12月01日 0 点赞 0 评论 635 浏览 评分:9.9
最笨的方法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,c,d,e,f; scanf("%d",&a); if(a>9999){ …… 题解列表 2022年12月01日 0 点赞 2 评论 439 浏览 评分:9.9
三位数分解 摘要:注意事项:换行符\n 参考代码: ###### #include using namespace std; int main(){ int a; scanf("%d",&a); …… 题解列表 2022年12月01日 0 点赞 0 评论 870 浏览 评分:9.9
(小白板)矩阵交换行 解题思路:很简单啊,就是一个循环直接做一个交换,但中间要用到一个交换变量注意事项:就是数组要从1开始输入,而不是从0开始,因为不符合我们数学的常规思想#includeintmain(){inta[100][100];inti,j;for(i=1;i 题解列表 2022年12月01日 0 点赞 3 评论 1306 浏览 评分:9.9