题解 | #数字求和#
数字求和
https://www.nowcoder.com/practice/e8cee01f2d834fa9ba3479fafe492b65
#include <iostream> using namespace std; int main() { int a, sum = 0, n; cin >> a; for(int i = 0;i < 5; i++){ cin >> n; if(n < a) sum += n; } cout << sum; return 0; }