結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2016-03-20 01:53:53 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 221 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 09:21:15 |
合計ジャッジ時間 | 933 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 21 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d",&aa); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { int aa; int ab[100]={1}; int ac=1; scanf("%d",&aa); do{ ab[ac]=ab[ac-1]*2; ac++; }while(ab[ac-1]<=aa); ac=ac-2; printf("%d\n",ac); if(aa!=ab[ac])ac=ac+1; printf("%d",ac); return 0; }