原题链接 import java.util.Scanner;//导入Scanner类 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] arr = new int[1000010]; int n = sc.nextInt(); arr[0]=arr[1]=1; for (int i = 2; i < n; i++) { arr[i]=(ar…
示例代码: #include <stdio.h>#include <stdlib.h> int main(void){ int n = 0 ; int i = 0 , j = 0 , min = 0; int *num ; scanf("%d",&n); num = (int*)malloc(sizeof(int)*n); for (i = 0 ; i < n ; i ++) { scanf("%d",&num[i]);…
示例代码: #include <stdio.h>#include <stdlib.h> int main(void){ int n = 0 ; int i = 0 , max = 0 , min = 0 , sum = 0; int* num; scanf("%d",&n); num = (int *)malloc(sizeof(int)*n); for (i = 0 ; i < n ; i ++) { scanf("%d",…