0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2025-01-23 16:51:59 +00:00

#667. [CQOI2007]余数之和

https://sjzezoj.com/submission/64189
This commit is contained in:
Baoshuo Ren 2022-11-12 12:12:17 +08:00
parent bbb3b3a0ce
commit c5b34b42a2
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
22 changed files with 82 additions and 0 deletions

19
S2OJ/667/667.cpp Normal file
View File

@ -0,0 +1,19 @@
#include <iostream>
#include <cmath>
using std::cin;
using std::cout;
using std::endl;
long long n, k, ans;
int main() {
cin >> n >> k;
ans = n * k;
for (int x = 1, gx; x <= n; x = gx + 1) {
gx = k / x ? std::min(k / (k / x), n) : n;
ans -= (k / x) * (x + gx) * (gx - x + 1) / 2;
}
cout << ans << endl;
return 0;
}

BIN
S2OJ/667/data/data1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/data9.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/667/data/problem.conf (Stored with Git LFS) Normal file

Binary file not shown.