結果
問題 |
No.836 じょうよ
|
ユーザー |
|
提出日時 | 2019-08-03 17:30:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 659 ms |
コンパイル使用メモリ | 66,204 KB |
最終ジャッジ日時 | 2025-01-07 10:38:55 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 28 TLE * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:11:17: warning: ‘Ans1’ may be used uninitialized [-Wmaybe-uninitialized] 11 | Ans1++; | ~~~~^~ main.cpp:6:9: note: ‘Ans1’ was declared here 6 | int Ans1; | ^~~~ main.cpp:13:17: warning: ‘Ans2’ may be used uninitialized [-Wmaybe-uninitialized] 13 | Ans2++; | ~~~~^~ main.cpp:7:9: note: ‘Ans2’ was declared here 7 | int Ans2; | ^~~~
ソースコード
#include<iostream> int main(){ int A,B,C; std::cin >> A >> B >> C; int Ans1; int Ans2; for(int i = A; i <= B; i++){ if(i%C == 0){ Ans1++; }else{ Ans2++; } } std::cout << Ans1 << std::endl; std::cout << Ans2 << std::endl; return 0; }