結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
aka123
|
| 提出日時 | 2020-06-29 16:33:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 374 ms / 5,000 ms |
| コード長 | 171 bytes |
| コンパイル時間 | 606 ms |
| コンパイル使用メモリ | 62,592 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 15:21:40 |
| 合計ジャッジ時間 | 1,503 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:10:11: warning: 'n' may be used uninitialized [-Wmaybe-uninitialized]
10 | cout<<n<<endl;
| ^
main.cpp:4:13: note: 'n' was declared here
4 | int a,b,n;
| ^
ソースコード
#include<iostream>
using namespace std;
int main(){
int a,b,n;
cin>>a>>b;
while(b>=1){
b-=a;
n++;
}
cout<<n<<endl;
return 0;
}
aka123