摘要: #include <stdio.h> int fun(int i) { int cnt = 0; while(i) { cnt++; i = i&(i-1); } return cnt; } int main() { printf( "%d\n", fun(2017) ); return 0; } 阅读全文
posted @ 2020-05-17 19:48 ジャスミン 阅读(1734) 评论(0) 推荐(1)
摘要: 题意:有n根长度不尽相同的棍子,初始时它们首尾垂直相连,标号为1--n,第一根棍子的下端坐标为(0,0),上端坐标为(0,len[1]),其余棍子依次类推。接下来执行C此旋转,每次输入一个编号num和角度rad,使得第num根棍子和第num+1跟棍子间的逆时针角度变为rad度,求每次旋转后第n跟棍子 阅读全文
posted @ 2020-05-17 17:16 ジャスミン 阅读(339) 评论(0) 推荐(1)
摘要: Peter studies the theory of relational databases. Table in the relational database consists of values that are arranged in rows and columns. There are 阅读全文
posted @ 2020-05-17 10:09 ジャスミン 阅读(145) 评论(0) 推荐(0)