题解 | 截取字符串

截取字符串

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;
}

全部评论

相关推荐

后来123321:别着急,我学院本大二,投了1100份,两个面试,其中一个还是我去线下招聘会投的简历,有时候这东西也得看运气
点赞 评论 收藏
分享
05-20 13:59
门头沟学院 Java
米黑子米黑子:你这个成绩不争取下保研?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务