2789: 骑车与走路 摘要:解题思路:注意事项:参考代码:a = int(input())if a / 3 + 50 < a / 1.2: print('Bike')elif a / 3 + 50 == a…… 题解列表 2022年12月01日 0 点赞 0 评论 714 浏览 评分:9.9
2788: 晶晶赴约会 摘要:解题思路:注意事项:参考代码:import sys a = int(input())if a < 1 or a > 7: sys.exit() #退出程序elif a != …… 题解列表 2022年12月01日 0 点赞 0 评论 697 浏览 评分:6.0
01背包(动态规划) 解题思路:动态规划对于01背包问题选择方法的集合可以分成2种:①不选第i个物品,并且总体积不大于j的集合所达到的最大值:f[i-1][j]②选择1~i个物品,并且总体积不大于j的集合所达到的最大值f[i][j]对于第二种情况我们很难计算,因此需要思考从另一个角度解决问题。 题解列表 2022年12月01日 0 点赞 0 评论 881 浏览 评分:9.9
题解 2970: 计算两个日期之间的天数 ###题解2970:计算两个日期之间的天数##解题思路使用一个固定的日期作为参考日期(我选则的是公元1年1月1日)计算两个日期分别相对于这个日期的差值,计算两个差值计算日期时,优先计算该日期的年份的一月一日距离参考日期的天数,再计算月份日期```javaimportjava.util.Scanner; 题解列表 2022年12月01日 0 点赞 0 评论 852 浏览 评分:9.9
同因查找(还行) 摘要:解题思路:注意事项:参考代码:for i in range(10,1000): if i%2==0 and i%3==0 and i%7==0: print(i) …… 题解列表 2022年12月01日 0 点赞 0 评论 507 浏览 评分:0.0
求偶数和(还行的解法) 摘要:解题思路:注意事项:参考代码:n=int(input())sn=0lit=list(map(int,input().split()))for i in lit: if i%2==0: …… 题解列表 2022年12月01日 0 点赞 0 评论 622 浏览 评分:0.0
队列思想,模拟思想,C / C++ 摘要: C++版 #include #include using namespace std; int main() { int n, m; while(cin >> n >> …… 题解列表 2022年12月01日 0 点赞 0 评论 496 浏览 评分:9.9
C语言 结构体之时间设计& 摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct calendar{ int year; int month; int day;}date, * p;…… 题解列表 2022年11月30日 0 点赞 0 评论 502 浏览 评分:9.9
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 评论 1002 浏览 评分:9.9
有点麻烦。。。。。。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,i; int arr[4],a[4]; for(n…… 题解列表 2022年11月30日 0 点赞 0 评论 432 浏览 评分:0.0