文章目录
- AcWing 713. 区间 2
- AC代码
AcWing 713. 区间 2
本题链接:AcWing 713. 区间 2
本博客给出本题截图:
AC代码
代码:
#include <iostream> #include <cstdio> using namespace std; int main() { int n, x, count1 = 0, count2 = 0; cin >> n; for (int i = 0; i < n; i ++ ) { cin >> x; if (x >= 10 && x <= 20) count1 ++; else count2 ++; } printf("%d in\n", count1); printf("%d out",count2); return 0; }