标签:问题 span 输入 clu sub names blog font turn
样例输出
11 33 55 M
示例代码:
1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 #define MAX_NUM 101 6 7 int main() 8 { 9 int n, b; 10 scanf("%d%d", &n, &b); 11 12 int arr[MAX_NUM]; 13 14 int tmp; 15 int k = 0; 16 for(int i = 0; i < n; i++) //查找 17 { 18 scanf("%d", &tmp); 19 if (tmp % b != 0) 20 { 21 arr[k++] = tmp; 22 } 23 } 24 25 sort(arr, arr + k); //排序 26 27 for (int i = 0; i < k; i++) //替换 28 { 29 if (arr[i] >= 65 && arr[i] <= 90) 30 printf("%c ", arr[i]); 31 else 32 printf("%d ", arr[i]); 33 } 34 35 return 0; 36 }
标签:问题 span 输入 clu sub names blog font turn
原文地址:http://www.cnblogs.com/cao-lei/p/7230619.html