結果
| 問題 | No.46 はじめのn歩 |
| コンテスト | |
| ユーザー |
chocopuu
|
| 提出日時 | 2018-06-03 17:09:28 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 619 ms |
| コンパイル使用メモリ | 68,852 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-20 05:51:40 |
| 合計ジャッジ時間 | 781 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:7:10: warning: 'b' is used uninitialized [-Wuninitialized]
7 | if(b % a == 0)
| ~~^~~
main.cpp:5:11: note: 'b' was declared here
5 | int a,b,ans;
| ^
ソースコード
#include<iostream>
using namespace std;
int main(){
int a,b,ans;
cin >> a,b;
if(b % a == 0)
ans = b / a;
else
ans = b / a + 1;
cout << ans << endl;
return 0;
}
chocopuu