标签:while else 过滤 -- 输出 pre class bsp std
//这道题利用c语言的输入输出才可AC,不然会一直超时
#include <stdio.h> int main(){ int m, n, a, b, c, k; scanf("%d %d %d %d %d", &m, &n, &a, &b, &c); while (m--){ for (int i = 0; i < n; i++){ scanf("%d", &k); if (k >= a && k <= b) k = c; if (i != 0) //补零输出,巧妙输出空格 printf(" %03d", k); else printf("%03d", k); } printf("\n"); } return 0; }
标签:while else 过滤 -- 输出 pre class bsp std
原文地址:https://www.cnblogs.com/Hk456/p/10743568.html