题解列表

筛选

C语言写冶炼金属(超简便写法)

摘要:解题思路:由题目可知V为最小时向上取整,V为最大时为向下取整:当 V = 20 时,有:⌊75/20⌋ = 3,⌊ 53/20 ⌋ = 2,⌊ 59/20 ⌋ = 2,可以看到符合所有冶炼记录。当 V……

数组插入处理

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

自定义函数并用数组解菲波那契数列

摘要:解题思路:1.定义函数2.数组注意事项:参考代码:#include <stdio.h>  int add(int n) {     // 创建一个数组用于存储菲波那契数列     int arr……

1095: The 3n + 1 problem

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n){ int i=1;  while(n!=1)  { if(n%2==0)    n=n/2;    else ……

1094: 字符串的输入输出处理

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

1014: [编程入门]阶乘求和

摘要:解题思路:1. 首先,在程序开头包含了2. 在主函数main()中,定义了变量n、i、j,分别用来保存输入的整数、循环计数的变量。3. 定义了变量ret和sum,分别用来保存每个阶乘结果和阶乘求和的结……

A+B python题解

摘要:解题思路:注意事项:参考代码:a,b = map(int,input().split())print(a+b)//说什么内容字数太少,本来以为会考什么数字太长需要用到数组啥的,没想到这么简单……

最小绝对值 数组

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,max,min;//最大和最小数的下标 int arr[10];//求完绝对值的数组 int arr……