結果
| 問題 | No.46 はじめのn歩 |
| コンテスト | |
| ユーザー |
JamesKaitoBond
|
| 提出日時 | 2017-11-11 22:57:40 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 186 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 36,992 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-18 22:11:24 |
| 合計ジャッジ時間 | 1,011 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:16:9: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
16 | printf("%d",ans);
| ~~~~~~^~~~~~~~~~
main.cpp:5:15: note: 'ans' was declared here
5 | int a,b,n,l,ans;
| ^~~
ソースコード
#include<stdio.h>
int main(void)
{
int a,b,n,l,ans;
scanf("%d %d",&a,&b);
l = b/a;
if(l*a == b)
ans = l;
if(l*a < b)
ans = l+1;
printf("%d",ans);
return 0;
}
JamesKaitoBond