From df9a0d140a7b7edef66f95aa13b5bb4488147f68 Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sat, 11 Feb 2017 11:37:48 +0700 Subject: Fast and furiously add others/volume1 --- others/volume1/010.pas | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 others/volume1/010.pas (limited to 'others/volume1/010.pas') 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. -- cgit 1.4.1