题解列表

筛选

回文串思路和参考代码(C语言)

摘要:解题思路:首先注意到字符串长度小于255,所以我们定义一个255个存储单元的数组即可,然后用scanf读入字符串,strlen函数得到字符个数,最后for循环判断。注意事项:参考代码:#include……

DNA简单题解

摘要:#include<iostream>using namespace std;struct DNA{    int a;//行数    int b;//重复度};int main(){    int n……

1209: 密码截获 java

摘要:``` import java.util.Scanner; public class Main { public static void main(String[] args) ……

编写题解 1223: 敲七游戏

摘要:解题思路:注意事项:参考代码:s = int(input()) count = 0 for i in range(1,s+1):     if i%7==0 or &#39;7&#39; in ……

利润计算--java

摘要:解题思路:利润 小于等于100000  100000 * 0.1利润大于100000小于等于200000100000 * 0.1+i(-100000) * 0.075利润大于200000 小于等于40……

编写题解 1159: 偶数求和

摘要:解题思路:分奇偶情况讨论注意事项:输出次数的计算参考代码:#include<iostream>using namespace std;int main(){    int n, m;    while……

1954: 话费计算

摘要:解题思路:注意事项:参考代码:a = int(input())s = 50 + a*0.4print("{:.1f}".format(s))……

java递归--阶乘求和

摘要:解题思路:如何求得每一项的阶乘1! 12! 1*23! 1*2*34! 1*2*3*4....注意事项:自己的代码,报编译50错误的,是精度问题将int型改为long类型参考代码:public sta……