回答編集履歴
1
別解を追加
answer
CHANGED
@@ -13,4 +13,16 @@
|
|
13
13
|
n -= (n >> 1);
|
14
14
|
printf("%d\n", n);
|
15
15
|
}
|
16
|
+
```
|
17
|
+
別解
|
18
|
+
```C
|
19
|
+
#include <stdio.h>
|
20
|
+
|
21
|
+
int main(void)
|
22
|
+
{
|
23
|
+
int n;
|
24
|
+
scanf("%d", &n);
|
25
|
+
while (n & n-1) n &= n-1;
|
26
|
+
printf("%d\n", n);
|
27
|
+
}
|
16
28
|
```
|