题解 | 截取字符串
截取字符串
https://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
#include <stdio.h> #include <string.h> int main() { int a; char b[1001]; scanf("%s", b); scanf("%d", &a); // 注意 while 处理多个 case // 64 位输出请用 printf("%lld") to for(int i=0;i<a;i++) printf("%c",b[i]); return 0; }