Submission #3312788
Source Code Expand
#include<bits/stdc++.h> using namespace std; int b; string a; int main() { cin>>a>>b; cout<<a[(b-1)%strlen(a)+1]; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - とても長い文字列 |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 146 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:8:27: error: cannot convert ‘std::string {aka std::basic_string<char>}’ to ‘const char*’ for argument ‘1’ to ‘size_t strlen(const char*)’ cout<<a[(b-1)%strlen(a)+1]; ^