0分求助!!!!!!!!!!!!!!!!!!!

P3612 [USACO17JAN] Secret Cow Code S

qaz12345678_ @ 2024-07-27 14:14:06

#include <bits/stdc++.h>
using namespace std;
string s;
long long n;
int main()
{
    cin >> s >> n;
    cout << s[s.size() % n];
}

by Mouse_King @ 2024-07-27 15:13:59

不是哥们,这思路不对吧,况且s.size()%n返回的就是s.size(),越界了!!!


|