제출 #38379

#제출 시각아이디문제언어결과실행 시간메모리
38379daniel_02Bomb (IZhO17_bomb)C++14
0 / 100
436 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 / 2; }

컴파일 시 표준 에러 (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...