cp-library

競技プログラミング用 C++ ライブラリ

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/multiplicative_prefix_sum_totient.test.cpp

test/multiplicative_prefix_sum_totient.test.cpp · GitHub で見る

検証問題

依存ライブラリ

コード

#define PROBLEM "https://judge.yosupo.jp/problem/sum_of_totient_function"
#include "math/totient_sum.hpp"
#include "math/mint.hpp"
#include "components/fast_io.hpp"

int main() {
	FastInput input;
	FastOutput output;
	std::uint64_t n = 0;
	input.read(n);
	output.println(totient_sum<mint>(n).val());
}
Back to top page