| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73417 | sh25_shenpy | 查找特定的值 | C++ | 解答错误 | 0 MS | 244 KB | 317 | 2025-11-09 15:39:39 |
#include <bits/stdc++.h> using namespace std; int main( ) { int n,x; string s; cin>>n; cin>>s; cin>>x; for(int i=0;i<n;i++) { if(s[i]==x){ cout<<i+1; break; } } if(s[n-1]>x||s[n-1]<x){ cout<<"-1"; } return 0; }