咱也不知道咋就做对了
摘要:解题思路:乱想的,3+2+1 1+2+3注意事项:无参考代码:#include<math.h>int main(){ int n = 0; scanf("%d", &n); int arr[1000]……
2025/8/8刷题记录
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n; &n……
有趣的跳跃(作个循环比较差值变化,别忘了是绝对值)
摘要:解题思路:他这个题目不得不说读不大懂,不过这代码思路可以通过,就说明他这是输入的数,按顺序的差值逐渐变小注意事项:参考代码:#include<stdio.h>
#include<string.h>
……
c代码记录之有趣的跳跃-C
摘要: #include
#include
int main()
{
int n,num[3000],xl[3000];
scanf(……
会排序就能做了,判断很简单
摘要:解题思路:把差的绝对值存到数组里并由小到大排好序,题目要求比较严苛,必须是1到(n-1)的排序才算正确,所以只需要判断数组中的第n-1项的值是否为n-1即可,不需要每一项都查看。注意事项:无参考代码:……
2838: 有趣的跳跃解题
摘要:解题思路:不进行排序,1~n-1作为数组下标,命中的该元素直接设置为1(默认值为0),如果已经为1了,重新设置直接可以打印Not jolly,退出程序。最后对1-~n-1的数组元素直接判断,看值是否都……
编写题集 思路清晰 C语言
摘要:#include <stdio.h>#include <math.h>int main(){ int n,i,a[100],b[100]; scanf("%d",&n); for(i=0;i<n;i+……
2838: 有趣的跳跃
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ long long n; int t=0,j,i,k=1; ……