题解列表

筛选

自定义函数之字符串连接

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void str_cat(char a[],char b[]){    strcat(a,b);  ……

[编程入门]结构体之成绩记录

摘要:解题思路:注意事项:参考代码:class Student():     def input(self, student_id, name, score):         self.student……

2901: 查找特定的值

摘要:```#include using namespace std; int n,x,N[100000]; int main(){ cin>>n; for( int i=1;i>N[i]; ……

2903: 不高兴的津津

摘要:``` #include using namespace std; int school[8],home[8],sum[8],ans; int main(){ for( int i=1;i……

求两个数的最大公约数和最小公倍数

摘要:解题思路:两个数的最大公约数可以用辗转相除法来计算,求得最大公约数后,由于最大公约数和最小公倍数的乘积等于这两个数的乘积,所以用两个数的乘积除以最大公约数就是这两个数的最小公倍数。参考代码:#incl……