diff --git a/S2OJ/667/667.cpp b/S2OJ/667/667.cpp new file mode 100644 index 00000000..0e6a3dcd --- /dev/null +++ b/S2OJ/667/667.cpp @@ -0,0 +1,19 @@ +#include +#include + +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; +} diff --git a/S2OJ/667/data/data1.in b/S2OJ/667/data/data1.in new file mode 100644 index 00000000..2b88d501 --- /dev/null +++ b/S2OJ/667/data/data1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae36057a3061caa873397b04872becc2b5c997a4361dd43a11839d2d450a6027 +size 7 diff --git a/S2OJ/667/data/data1.out b/S2OJ/667/data/data1.out new file mode 100644 index 00000000..526c11bb --- /dev/null +++ b/S2OJ/667/data/data1.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e085d0141aabeda37de279250dd8ee362f0f7b338b32c20bf6ff3d55493defdd +size 5 diff --git a/S2OJ/667/data/data10.in b/S2OJ/667/data/data10.in new file mode 100644 index 00000000..3a6cb7a8 --- /dev/null +++ b/S2OJ/667/data/data10.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd273a276d584515d8ab1ec17ed42cdcce62cc1f5ca5dbb2197158e95c196d72 +size 18 diff --git a/S2OJ/667/data/data10.out b/S2OJ/667/data/data10.out new file mode 100644 index 00000000..4ca903a9 --- /dev/null +++ b/S2OJ/667/data/data10.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfac5580a243e72d7128bf2a939762fde0444c2a58db758773f8f5d5b3c1f3fd +size 16 diff --git a/S2OJ/667/data/data2.in b/S2OJ/667/data/data2.in new file mode 100644 index 00000000..124a2593 --- /dev/null +++ b/S2OJ/667/data/data2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0073cf03577a737756752129cc3abcb9f5a4069c705321ee2115574cc31c59f9 +size 22 diff --git a/S2OJ/667/data/data2.out b/S2OJ/667/data/data2.out new file mode 100644 index 00000000..d77bd2f4 --- /dev/null +++ b/S2OJ/667/data/data2.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9bd51ee024036bbd2a0e82fc900974644427132155a0504b7c913cb1ab03f75 +size 19 diff --git a/S2OJ/667/data/data3.in b/S2OJ/667/data/data3.in new file mode 100644 index 00000000..924ca8f2 --- /dev/null +++ b/S2OJ/667/data/data3.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3061080d8f4e8b9c0be2be50678b4555b8ba12e0ebc58539db8315d905d5f5c +size 5 diff --git a/S2OJ/667/data/data3.out b/S2OJ/667/data/data3.out new file mode 100644 index 00000000..c65f1158 --- /dev/null +++ b/S2OJ/667/data/data3.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a252402972f6057fa53cc172b52b9ffca698e18311facd0f3b06ecaaef79e17 +size 3 diff --git a/S2OJ/667/data/data4.in b/S2OJ/667/data/data4.in new file mode 100644 index 00000000..5fd950c2 --- /dev/null +++ b/S2OJ/667/data/data4.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4b88fff8fe8cd15e7c5728e402e6679c4615ff8e4b99c55208ceedf970fb3c4 +size 5 diff --git a/S2OJ/667/data/data4.out b/S2OJ/667/data/data4.out new file mode 100644 index 00000000..ad2c816c --- /dev/null +++ b/S2OJ/667/data/data4.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3840bc236ee03aacbb1ef7d5108ddfa347c59f10b68d4174affbb53140f31273 +size 3 diff --git a/S2OJ/667/data/data5.in b/S2OJ/667/data/data5.in new file mode 100644 index 00000000..aa3ee33c --- /dev/null +++ b/S2OJ/667/data/data5.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0dd749c2074e6c66117284c5e1d367bcb03a85cefadbb079d7e57ac3be8f153 +size 18 diff --git a/S2OJ/667/data/data5.out b/S2OJ/667/data/data5.out new file mode 100644 index 00000000..1a0462ea --- /dev/null +++ b/S2OJ/667/data/data5.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:631dadb37045a4dde23e8a39dcca2aa4ac353d4acde096515d507cacca8db746 +size 16 diff --git a/S2OJ/667/data/data6.in b/S2OJ/667/data/data6.in new file mode 100644 index 00000000..46d33a80 --- /dev/null +++ b/S2OJ/667/data/data6.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f11ad6bbc7ecca0b2416b713dee77f1a635c00aaeaa946e14cde1c2bfae56d5 +size 4 diff --git a/S2OJ/667/data/data6.out b/S2OJ/667/data/data6.out new file mode 100644 index 00000000..804fcc90 --- /dev/null +++ b/S2OJ/667/data/data6.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa +size 2 diff --git a/S2OJ/667/data/data7.in b/S2OJ/667/data/data7.in new file mode 100644 index 00000000..4ce2b5e1 --- /dev/null +++ b/S2OJ/667/data/data7.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094f53851d789a7dfbebbbd19875d6dff79aeb9b1dbbadefc1f5bab77d597ff0 +size 21 diff --git a/S2OJ/667/data/data7.out b/S2OJ/667/data/data7.out new file mode 100644 index 00000000..3699a5f6 --- /dev/null +++ b/S2OJ/667/data/data7.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15473b32e9aa566e695c9a7a0e9fd79a77253ed86923714d3fef89c5dae20576 +size 19 diff --git a/S2OJ/667/data/data8.in b/S2OJ/667/data/data8.in new file mode 100644 index 00000000..87b9bf60 --- /dev/null +++ b/S2OJ/667/data/data8.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d607f63802c8ae5a0646ee41f1f0bc83803f431abf8485d1c1f7b142a3de4649 +size 5 diff --git a/S2OJ/667/data/data8.out b/S2OJ/667/data/data8.out new file mode 100644 index 00000000..396b6814 --- /dev/null +++ b/S2OJ/667/data/data8.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1fb50e6c86fae1679ef3351296fd6713411a08cf8dd1790a4fd05fae8688164 +size 3 diff --git a/S2OJ/667/data/data9.in b/S2OJ/667/data/data9.in new file mode 100644 index 00000000..11928878 --- /dev/null +++ b/S2OJ/667/data/data9.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29b11a5b77aa9b257ca14e6c4dbe064cf94dc40bdccd776bbdc85e674508730c +size 16 diff --git a/S2OJ/667/data/data9.out b/S2OJ/667/data/data9.out new file mode 100644 index 00000000..b80035de --- /dev/null +++ b/S2OJ/667/data/data9.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae96e337a17515f478e7aa195f30b4568d6d1550635c324a84b1630ae3d71929 +size 15 diff --git a/S2OJ/667/data/problem.conf b/S2OJ/667/data/problem.conf new file mode 100644 index 00000000..7164628e --- /dev/null +++ b/S2OJ/667/data/problem.conf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a19368de1cd76929cf7cdfeebc2925002f9dcc79d43f2189c41cb4b2a9d48cfc +size 193