結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| ユーザー |
Haijinn
|
| 提出日時 | 2016-11-18 22:40:56 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 186 bytes |
| コンパイル時間 | 714 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 07:21:42 |
| 合計ジャッジ時間 | 1,250 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 21 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
int n;
int i;
int r=1;
int w=1;
scanf("%d",&n);
for(i=0;i<n;i++){
r=r*2;
w++;
if(r>=n){
break;
}
}
printf("%d",w);
return 0;
}
Haijinn