回答編集履歴
1
別解を追加
test
CHANGED
@@ -29,3 +29,27 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
```
|
32
|
+
|
33
|
+
別解
|
34
|
+
|
35
|
+
```C
|
36
|
+
|
37
|
+
#include <stdio.h>
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
int main(void)
|
42
|
+
|
43
|
+
{
|
44
|
+
|
45
|
+
int n;
|
46
|
+
|
47
|
+
scanf("%d", &n);
|
48
|
+
|
49
|
+
while (n & n-1) n &= n-1;
|
50
|
+
|
51
|
+
printf("%d\n", n);
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
```
|