diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-11 11:37:48 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-11 11:37:48 +0700 |
commit | df9a0d140a7b7edef66f95aa13b5bb4488147f68 (patch) | |
tree | de213e8e6abf244426fcec5974c1cc247897f869 /others/volume1/010.pas | |
parent | 092019121ad5ef6f82cd8fe7bf6ee143fce9648d (diff) | |
download | cp-df9a0d140a7b7edef66f95aa13b5bb4488147f68.tar.gz |
Fast and furiously add others/volume1
Diffstat (limited to 'others/volume1/010.pas')
-rw-r--r-- | others/volume1/010.pas | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/others/volume1/010.pas b/others/volume1/010.pas new file mode 100644 index 0000000..bf8ae90 --- /dev/null +++ b/others/volume1/010.pas @@ -0,0 +1,21 @@ +const + pow5: array[2..25] of qword = (25, 125, 625, 3125, 15625, 78125, 390625, + 1953125, 9765625, 48828125, 244140625, + 1220703125, 6103515625, 30517578125, + 152587890625, 762939453125, 3814697265625, + 19073486328125, 95367431640625, + 476837158203125, 2384185791015625, + 11920928955078125, 59604644775390625, + 298023223876953125); + +var + n, count: qword; + i: byte; + +begin + readln(n); + count := n div 5; + for i := 2 to 25 do + count := count + n div pow5[i] * (i - 1); + writeln(count) +end. |