传送门 题意:求区间[a, b]中二进制位为1的个数最多的那个数,如果存在多解,则输出最小的那个.(0 <= a <= b) 关键: 对一个数a可以利用 a | (a + 1) 来将a的二进制位中最低的0设置为1 附上代码: #include <stdio.h> typedef long long ll; int main(void) { int n; scanf("%d", &n); ) { ll l, r; scanf("%lld %lld…
1138 - Trailing Zeroes (III) problem=1138"> problem=1138&language=english&type=pdf">PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You task is to find minimal natural number N, so that N! contains exactl…