题解 | #序列中删除指定数字#
序列中删除指定数字
https://www.nowcoder.com/practice/7bbcdd2177a445a9b66da79512b32dd7
#include <stdio.h> int main() { int n, a[20] = {0}; scanf("%d", &n); for (int i = 0; i <= n; i++) { scanf("%d", &a[i]); } for (int i = 0; i < n; i++) { if (a[i] != a[n]) printf("%d ", a[i]); } return 0; }