2901:查找特定的值——遍历 摘要:解题思路: 给了n个数,需要从中找值为x的数的下标。 因此可以设定一个数组a,用来存放这n个数。 然后遍历数组a,寻找某个下标k,使得 a[k…… 题解列表 2023年01月09日 0 点赞 0 评论 324 浏览 评分:0.0
查找特定的值 摘要:解题思路:首先通过scanf获取数据,接着对给定的一串数据,通过数组记录,开始获取的数据即为数组长度,再由这个数组长度来声明数组,并通过循环遍历给数据赋值,至此已经获得了一串代找数据,然后先给一共变量…… 题解列表 2023年10月14日 0 点赞 0 评论 447 浏览 评分:0.0
太难了真是要自习看题目 摘要:解题思路:注意事项:参考代码:n=int(input())a=list(map(int,input().split()))x=int(input())for i in range(n): if …… 题解列表 2023年05月05日 0 点赞 0 评论 313 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int n,* a,i,m; scanf("%d", &n); …… 题解列表 2023年06月03日 0 点赞 0 评论 226 浏览 评分:0.0
2901: 查找特定的值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;const int N=1e7;ll a[N];using namespace s…… 题解列表 2024年04月20日 0 点赞 0 评论 273 浏览 评分:2.0
2901: 查找特定的值 摘要:```cpp #include #include using namespace std; int main() { int m,n,a[10000],i=0; mems…… 题解列表 2022年11月30日 0 点赞 0 评论 371 浏览 评分:8.0
编写题解 2901: 查找特定的值 摘要:解题思路:输入-判断-输出注意事项:第一次出现字符参考代码:#include<stdio.h>int main(){ int n,x,i; scanf("%d\n",&n); int…… 题解列表 2022年10月21日 0 点赞 1 评论 1079 浏览 评分:8.0
2901: 查找特定的值 摘要:注意事项:第一遍没做出来!!没有想到bool变量 和 第二个if!!参考代码:#include<iostream> using namespace std; int main() { bo…… 题解列表 2024年03月19日 0 点赞 0 评论 271 浏览 评分:9.9
编写题解 2901: 查找特定的值 摘要:解题思路: 1、创建三个变量(int n输入个数,m目标 bool z用于判断是否有目标数=false) 2、创建一个数组a[10001] 3、输入输入个数变量n 4、循环输入a数组的第i项 5、输入…… 题解列表 2023年07月13日 1 点赞 0 评论 382 浏览 评分:9.9
查找特定的值 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Java { public static void java(String[] args…… 题解列表 2023年12月14日 0 点赞 2 评论 306 浏览 评分:9.9