杭电1339(A Simple Task)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include <stdio.h> 2 int main() 3 { 4 int z, p, n; 5 scanf("%d", &z); 6 while (z-- != 0) 7 { 8 scanf("%d", &n); 9 p = 0; 10 while (n%2== 0) 11 { 12 ++p; 13 n=n/2; 14 } 15 printf("%d %d\n", n, p); 16 } 17 return 0; 18 }
1 #include <stdio.h> 2 int main() 3 { 4 int z, p, n; 5 scanf("%d", &z); 6 while (z-- != 0) 7 { 8 scanf("%d", &n); 9 p = 0; 10 while (n%2== 0) 11 { 12 ++p; 13 n=n/2; 14 } 15 printf("%d %d\n", n, p); 16 } 17 return 0; 18 }