摘要:
题目描述 You are given an integer n.You are required to calculate (n mod 1) xor (n mod 2) xor ... xor (n mod (n - 1)) xor (n mod n).The “xor” operation me 阅读全文
摘要:
题目描述 给出正整数n和k,计算j(n,k)=k mod 1 + k mod 2 + k mod 3 +⋯+ k mod n的值。其中k mod i表示k除以i的余数。例如j(5,3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5 = 0 + 1 + 阅读全文
摘要:
题目描述 You are given a tree with n nodes. The weight of the i-th node is wi . Given a positive integer m,now you need to judge that for every integer i 阅读全文