久久更新的程式解題練習。 PTT2比較常更新,需要使用PCMAN程式或是ssh bbsu@ptt2.cc。
1 #include <iostream> 2 #include <cstdio> 3 #include <cstdlib> 4 #include <cmath> 5 using namespace std; 6 int main(){ 7 int n; 8 while(scanf("%d", &n) != EOF){ 9 printf("%d\n", (int)log2(n)+1); 10 } 11 return 0; 12 }
TEST
沒有留言:
張貼留言
TEST