Run ID:110284
提交时间:2025-02-15 17:16:34
#include <bits/stdc++.h> using namespace std; int main() { int x,y,s=0,t,v; cin>>x; int a[x+5]; for(int i=1;i<=x;i++){ cin>>a[i]; } cin>>y; for(int i=1;i<=x;i++){ if(a[i]==y){ s=s+1; t=i; } } v=t-s+1; cout<<v<<' '<<t; return 0; }