题解列表

筛选

]结构体之成绩记录

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct Stu{    char id[20],name[20];    int score1,score2,score3;};v……

c语言小白写法,用struct

摘要:解题思路:注意事项:参考代码:#include <stdio.h>typedef struct student{    int id;    float score;} student;int mai……

陶陶摘苹果

摘要:解题思路:通过两个for循环来完成注意事项:参考代码:#include <iostream>using namespace std;int main() { int a[10]; for (int i……

2692质因数个数(部分超时)

摘要:只能过70,有没有大佬指导一下还可以怎么优化 ```python def checkPrime(num): if (num == 2) or (num == 3): r……

报数问题。。。记录一下

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

c语言简单解法

摘要:解题思路:利用数组求解,利用break用来使循环终止从而达到前面的i先输出,提前设输出变量=-1,若符合则变量=i+1,避免if多次判断注意事项:不要把赋值和等于号混淆,数组下标从0开始参考代码:#i……

二分法解决单调多元方程问题

摘要:解题思路:    由题目可知IRR大于-1,设x=IRR+1,x>0。对NPV关于x进行求导可知,NPV关于x的函数是个单调递减函数。    又因为当x—>0时,NPV—>正无穷,x—>正无穷时,NP……

编写题解 1196: 去掉空格

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