当前位置: 代码迷 >> 综合 >> HDOJ 1196 Lowest Bit(水题)
  详细解决方案

HDOJ 1196 Lowest Bit(水题)

热度:73   发布时间:2023-10-21 19:45:41.0

HDACM1196

import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);while (sc.hasNext()) {int a = sc.nextInt();if (a==0) {break;}int i = 1;while (a%2==0) {a /= 2;i *= 2;}System.out.println(i);}}
}