結果
問題 |
No.682 Average
|
ユーザー |
![]() |
提出日時 | 2023-08-19 17:15:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 264 bytes |
コンパイル時間 | 968 ms |
コンパイル使用メモリ | 93,504 KB |
最終ジャッジ日時 | 2025-02-16 11:38:45 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:13:34: warning: ‘cnt’ may be used uninitialized [-Wmaybe-uninitialized] 13 | if (!((a + b + i)%3)) cnt++; | ~~~^~ main.cpp:10:15: note: ‘cnt’ was declared here 10 | int a, b, cnt; | ^~~
ソースコード
#include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> using namespace std; int main() { int a, b, cnt; cin >> a >> b; for (int i = a; i <= b; i++){ if (!((a + b + i)%3)) cnt++; } cout << cnt << endl; }