题解 | 小红的矩阵
小红的矩阵
https://www.nowcoder.com/practice/df690022406d4e8d8594890f3e109cde
// #牛客春招刷题训练营# https://www.nowcoder.com/discuss/726480854079250432
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false),cin.tie(0);
int n, m;
cin >> n >> m;
int ans = 0, x;
for(int i = 0; i < n * m; i++){//---------输入
cin >> x;
if (x % 10 == 9) ans++;//-----------取余-》保留个位-》判断
}
cout << ans;
}
// 64 位输出请用 printf("%lld")
#写题解领奖励##牛客春招刷题训练营#
