Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
435281 王程之 26年2月-A组(萌新)B. 环形密码 C++ 通过 100 4 MS 260 KB 252 2026-04-04 18:55:11

Tests(10/10):


#include<bits/stdc++.h> using namespace std; string s,t; int p; int main(){ cin>>s>>t; int l=s.size(); for(int i=0;i<l;i++){ if(s[i]==t[0]){ p=i; } } int m=l-p; if(m<l-m){ cout<<m; }else{ cout<<l-m; } return 0; }


测评信息: