摘要: 1.按位与(&): 运算规则:只有两个数的二进制同时为1,结果才为1,否则为0。 即 0 & 0= 0 ,0 & 1= 0,1 & 0= 0, 1 & 1= 1。 两个整数在按位与运算时每一位分别进行运算,如3&5=011&101=001=1; 按位或(|): 2.运算规则:参加运算的两个数只要两个 阅读全文
posted @ 2022-04-11 23:17 cbmango 阅读(172) 评论(0) 推荐(1)
摘要: A. GCD vs LCM You are given a positive integer nn. You have to find 44 positive integers a,b,c,da,b,c,d such that a+b+c+d=na+b+c+d=n, and gcd(a,b)=lcm 阅读全文
posted @ 2022-04-11 17:52 cbmango 阅读(228) 评论(0) 推荐(3)