結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2020-07-15 12:43:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 5,000 ms |
コード長 | 158 bytes |
コンパイル時間 | 1,791 ms |
コンパイル使用メモリ | 191,804 KB |
最終ジャッジ日時 | 2025-01-11 21:07:42 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:16: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | int N;scanf("%d",&N);int num=1,ans=0; | ~~~~~^~~~~~~~~
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int N;scanf("%d",&N);int num=1,ans=0; while(num<N){num*=2;ans++;} printf("%d\n",ans); }