题解列表

筛选

母牛的故事 (C语言代码)

摘要:解题思路:首先看清题目,明白当n=5时,母牛数量为6的含义,然后慢慢列数列,找规律,你会发现n>4时,第n年的母牛数量等于第n-1年母牛的数量在再上第n-3年母牛的数量(因为这些母牛都会在他们的第四年……

循环数组就好啦

摘要:解题思路:循环数组的思想就行拉注意事项:参考代码:#include<cstdio>#include <cstring>#include <ctype.h> using namespace std;in……

P1021 (C语言代码)

摘要:为什么运行结果是错的?参考代码:#include<iostream>#include<math.h>using namespace std;#define N 100int main(){ int a……

汪汪与打针 (C语言代码)

摘要:解题思路:注意事项:参考代码:#define M 120    //妙三多的价格 #define Y 100    //疫苗的价格 #include <stdio.h> int main(v……

矩阵乘法 (C语言代码)

摘要:解题思路:注意事项:本题主要考察线性代数的知识。注意一些特殊情况。参考代码:#include<stdio.h>int juzheng[3][30][30];int n;int js(int i,int……