热门

最新

红包

立Flag

投票

同城

我的

发布
xianyu120
秒懂AI+ 2021年博客之星大数据领域Top1
4 年前
truexianyu120

为家乡而战

C站每日精选
CSDN App 扫码分享
分享
评论
5
打赏
  • 复制链接
  • 举报
下一条:
6翻了#include<stdio.h>#include<string.h>int main(){ char str[1005]; int count = 0, i, j; gets(str); for (i = 0; i <= strlen(str); i++) { if (str[i] == '6') { count++; } else { if (count > 9) printf("27"); else if (count > 3) printf("9"); else { for (j = 0; j < count; j++) { printf("6"); } } printf("%c", str[i]); count = 0; } } return 0;}
立即登录