土办法。感觉这题目没说仔细 摘要:解题思路:题目并没有说明m,n 的奇偶性,但根据大家发的题解,好像有默认。。我发一个没默认的土办法。:)注意事项:要想清楚在range里的参数范围到底要不要+1参考代码:m,n = map(int,i…… 题解列表 2025年02月25日 0 点赞 0 评论 433 浏览 评分:0.0
利用循环得到n次的数字,然后求和 摘要:解题思路:每次循环把上一个值乘10再加上结尾的2注意事项:跳出循环后还需要再算一次和参考代码:int main(){ int a=2,n;&…… 题解列表 2025年02月25日 1 点赞 0 评论 672 浏览 评分:0.0
贪心算法解决金银岛 摘要:解题思路:注意事项:参考代码:def bravery(data,w): data.sort(key=lambda x:x[2],reverse=True) &n…… 题解列表 2025年02月26日 0 点赞 0 评论 164 浏览 评分:0.0
字符串的输入输出处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#define max 1000int main(){ int n,i=0;…… 题解列表 2025年02月26日 0 点赞 0 评论 417 浏览 评分:0.0
The 3n + 1 problem 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int prime(int a){ int c = 0; while (a != 1) { c++; if (a % 2…… 题解列表 2025年02月26日 0 点赞 0 评论 161 浏览 评分:0.0
用Java里的StringBuilder方法 摘要:public class Main { public static void main(String[] args) { StringBuilder sb = new StringBuild…… 题解列表 2025年02月26日 0 点赞 0 评论 306 浏览 评分:0.0
题解 1864: 数日子 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ printf("200");  …… 题解列表 2025年02月26日 0 点赞 0 评论 110 浏览 评分:0.0
最小函数值(minval) 不用优先队列玄学做法 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"usingnamespacestd;#definell&nb…… 题解列表 2025年02月26日 0 点赞 0 评论 142 浏览 评分:0.0
用C++求位数 摘要:解题思路:首先需要定义数字类型,由题目可知是整数型(int),然后观察题目可得并没有给出具体数字,那么就是说这个是对所有 三位数成立,我们需要手动输入数字,代码中我们用a表示;通过数学计算可拆分位数。…… 题解列表 2025年02月26日 1 点赞 0 评论 346 浏览 评分:0.0