题解列表

筛选

母牛的故事【迭代解法】

摘要:解题思路:母牛数量由各个年头的母牛数量求和,而各个年头的母牛数量又和前一年的母牛数量相关注意事项:第三个年头的母牛刚到第四年也会生一头母牛,所以新生母牛的数量应该为同年年头为4的母牛的数量参考代码:d……

最基本的思路

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){   int n;   scanf("%d",&n);   int arr[n],i,sum=0;   for(i……

[编程入门]电报加密

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){      int i;      char a[1001];      ge……

回文子串 (Java代码)

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

陶陶摘苹果

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){      int a[10],i,n,t=0;      for(i=0;i<10;i++)      {   ……

二级C语言-分段函数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fun(double x){ if(x<1) { return x; } else if(x>=1 && x<10) {……

二级C语言-等差数列

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n,s=0,i;    scanf("%d",&n);    for(i=1;i<=n;i++) ……

2131基础解法(Python)

摘要:参考代码:V, m = map(int, input().split())lst_rec = []for i in range(m) :    lst_rec.append([int(i) for i……