```cpp #include <iostream> #include <cstring> void strmcpy(char* s, const char* t, int m) { strcpy(s, t + m - 1); } int main() { int repeat; std::cin >> repeat; for (int i = 0; i < repeat; i++) { char s[100], t[100]; int m; std::cin >> t >> m; strmcpy(s, t, m); std::cout << s << std::endl; } return 0; } ``` [2024-11-30 13:34:49 | AI写代码神器 | 254点数解答]