結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2016-11-18 22:57:32 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 224 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 07:42:09 |
合計ジャッジ時間 | 859 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 20 |
コンパイルメッセージ
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; if(r>=n){ break; } } if(n==1){ printf("0"); }else{ printf("%d",w); } return 0; }