From 7bbe6ec411abe1db6cd3113783936cd89f2541eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Fri, 15 Dec 2023 11:20:58 +0800 Subject: [PATCH] 'commit' --- TangDou/AcWing/RongChi/HDU2204_2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TangDou/AcWing/RongChi/HDU2204_2.cpp b/TangDou/AcWing/RongChi/HDU2204_2.cpp index 0961248..e15a3eb 100644 --- a/TangDou/AcWing/RongChi/HDU2204_2.cpp +++ b/TangDou/AcWing/RongChi/HDU2204_2.cpp @@ -30,12 +30,13 @@ void get_mobius(LL n) { } int main() { + // 筛法求莫比乌斯函数 get_mobius(N - 1); - LL t; - while (cin >> t) { + LL T; + while (cin >> T) { LL s = 1; - for (LL i = 2; i <= 64; i++) s -= mu[i] * (LL)(pow(t * 1.0, 1.0 / i) - 1); + for (LL i = 2; i <= 64; i++) s -= mu[i] * (LL)(pow(T * 1.0, 1.0 / i) - 1); cout << s << endl; } return 0;