結果
問題 |
No.485 方程式のお勉強
|
ユーザー |
![]() |
提出日時 | 2017-02-24 22:21:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 151 bytes |
コンパイル時間 | 713 ms |
コンパイル使用メモリ | 57,176 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-02 22:35:57 |
合計ジャッジ時間 | 1,443 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:13: warning: ‘b’ is used uninitialized [-Wuninitialized] 5 | if(b%a==0){ | ~^~ main.cpp:4:16: note: ‘b’ was declared here 4 | int a, b; | ^ main.cpp:5:13: warning: ‘a’ is used uninitialized [-Wuninitialized] 5 | if(b%a==0){ | ~^~ main.cpp:4:13: note: ‘a’ was declared here 4 | int a, b; | ^
ソースコード
#include <iostream> using namespace std; int main(){ int a, b; if(b%a==0){ cout << b/a << endl; } else { cout << "NO" << endl; } return 0; }