题解列表

筛选

三个嵌套for循环+pow函数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>    //pow函数的头文件int main(){ int a,b,c,cn,sn; cn=sn=0;……

过滤多余的空格(Java)

摘要:解题思路:注意事项:参考代码:public static void main(String args[]) { Scanner sc=new Scanner(System.in); Str……

最简洁的解

摘要:参考代码:n = int(input()) # 初始饮料数和瓶盖数 total_drinks = n caps = n # 不断循环,直到无法再换取新的饮料 while caps >……

大整数乘法C++

摘要://大整数乘法#include <bits/stdc++.h>using namespace std;int na[2005], nb[2005], nc[4010];string mul(strin……

接龙数列动态规划的python写法

摘要:解题思路:极简 线性DP-Dotcpp编程社区dp[]数组长度设置为10,因为接龙数列的每一项均为数字,从1~9,0不需要考虑进去;dp[]数组的含义:以i结尾的接龙数列的最大长度;设a为接龙数列的第……