mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
1041. [HAOI2008]圆上的整点
https://hydro.ac/d/bzoj/record/63a460bccf75a716a1673b8f
This commit is contained in:
parent
0dc2cb7fe2
commit
6c1c09faf2
35
BZOJ/1041/1041.cpp
Normal file
35
BZOJ/1041/1041.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#include <iostream>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
const char endl = '\n';
|
||||
|
||||
int main() {
|
||||
std::ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
long long r, ans = 1;
|
||||
|
||||
cin >> r;
|
||||
|
||||
for (int i = 2; i * i <= r; i++) {
|
||||
if (r % i == 0) {
|
||||
int cnt = 0;
|
||||
|
||||
while (r % i == 0) {
|
||||
r /= i;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (i % 4 == 1) ans *= cnt * 2 + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (r != 1 && r % 4 == 1) {
|
||||
ans *= 3;
|
||||
}
|
||||
|
||||
cout << ans * 4 << endl;
|
||||
|
||||
return 0;
|
||||
}
|
BIN
BZOJ/1041/data/1.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/1.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/1.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/1.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/10.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/10.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/10.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/10.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/2.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/2.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/2.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/2.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/3.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/3.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/3.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/3.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/4.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/4.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/4.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/4.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/5.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/5.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/5.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/5.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/6.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/6.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/6.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/6.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/7.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/7.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/7.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/7.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/8.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/8.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/8.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/8.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/9.in
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/9.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
BZOJ/1041/data/9.out
(Stored with Git LFS)
Normal file
BIN
BZOJ/1041/data/9.out
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user