結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-07-15 23:35:58 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 175 bytes |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-15 04:48:39 |
| 合計ジャッジ時間 | 882 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<math.h>
int main(void){
int n,ans=0,max=1;
scanf("%d",&n);
while(n>max*2) max *= 2;
ans = log2(max) + 1;
printf("%d\n",ans);
return 0;
}