题解列表

筛选

纪念品分组 (C语言代码)

摘要:解题思路:用qsort函数对每件纪念品的价格进行降序排序,然后将第一个(即最大)与最后一个(即最小)一起和规定钱数比较。以测试样例为例,排序后为 90 90 80 70 60 50 30 20 20 ……

人见人爱A+B (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(void){ int a, b, c, d, e, f, i, n; scanf("%d", &n); for (i……

素数回文 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(void){ long i, j, k, l, a, b, m, flag, count, count1; int ……

母牛生小牛 (C语言代码)

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

数字整除 (C语言代码)

摘要:解题思路:根据题目要求来写就行了(我写的具体要求可能和题目的有点偏差)注意事项:参考代码:#include <stdio.h>void main(){     int n;  //输入的数     i……

内部收益率 (C语言代码)

摘要:解题思路:就老老实实照着上面写的公式算。试出来的。-1到正无穷。注意事项:double,最好不要用=号,用约等于就行。参考代码:#include<stdio.h>#include<math.h>int……