O(n*logn)复杂度的 import sys if __name__ == "__main__": t,k=sys.stdin.readline().strip().split() t,k=int(t),int(k) for _ in range(t): a,b=sys.stdin.readline().strip().split() a,b=int(a),int(b) times=0 count=0 for i in range(a,b+1): ...