数1的个数,题目短吗 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,c,y,x,h; int count=0,b=0; scanf("%d",&n…… 题解列表 2024年01月14日 0 点赞 0 评论 367 浏览 评分:6.0
1147: C语言训练-角谷猜想 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long aj; cin>>aj; …… 题解列表 2024年01月15日 0 点赞 0 评论 200 浏览 评分:6.0
1328: 移动服务员 摘要:# 1328: 移动服务员 是一道比较经典的入门题dp。 ```cpp /* * 题目 1328: 移动服务员 * 很容易设计出两种dp数组 dp[轮数][服务员数量][服务员位置],…… 题解列表 2024年01月15日 0 点赞 0 评论 364 浏览 评分:6.0
题解 2818: 分离整数的各个数位 摘要:解题思路:首先读取输入的整数 n。使用循环,当 n 不为 0 时执行以下步骤。在循环中,将 n 对 10 取余数,得到当前的个位数字。输出该数字,并在后面加上一个空格。将 n 除以 10,去掉已经处理…… 题解列表 2024年01月16日 0 点赞 0 评论 331 浏览 评分:6.0
利用题目数据求解温度转换 摘要:解题思路:利用题目中所给的公式即可求得所需数据;公式为: c=5(F-32)/9;F=输入数据,c=输出数据注意事项:1、题中所给输出数据为浮点数,故需要输出时也为浮点数且保留小数点后两位,否则答案错…… 题解列表 2024年01月17日 2 点赞 0 评论 1023 浏览 评分:6.0
1267:A+B Problem 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; cin>>a; cout<<a+b…… 题解列表 2024年01月19日 0 点赞 0 评论 664 浏览 评分:6.0
1234: 检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; cin>>n; …… 题解列表 2024年01月19日 0 点赞 0 评论 260 浏览 评分:6.0
分支结构-判断能否被3、5、7整除 摘要:#include #include int main() { int n; scanf("%d",&n); if(n%3==0&&n%5==0&&n%7==0) …… 题解列表 2024年01月22日 0 点赞 1 评论 525 浏览 评分:6.0
动态规划java实现。实际上找的是每一位上所能允许的最长长度,要不断的和前面的作比较 摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n]; …… 题解列表 2024年01月22日 0 点赞 0 评论 281 浏览 评分:6.0