Submission #38377

#TimeUsernameProblemLanguageResultExecution timeMemory
38377daniel_02Bomb (IZhO17_bomb)C++14
1 / 100
406 ms2016 KiB
#include <bits/stdc++.h> using namespace std; char a; int ans; int main() { int n, m; cin >> n >> m; for (int i = 0; i < n; i++) { scanf("\n"); for (int j = 0; j < m; j++) { scanf("%c",&a); if (a == '1')ans++; } } cout << ans; }

Compilation message (stderr)

bomb.cpp: In function 'int main()':
bomb.cpp:17:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
        scanf("\n");
                   ^
bomb.cpp:20:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
            scanf("%c",&a);
                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...