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/003.pas | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 others/volume1/003.pas (limited to 'others/volume1/003.pas') diff --git a/others/volume1/003.pas b/others/volume1/003.pas new file mode 100644 index 0000000..a4818da --- /dev/null +++ b/others/volume1/003.pas @@ -0,0 +1,15 @@ +var + n: int64; + l, s: byte; + +begin + readln(n); + l := 0; + s := 0; + repeat + inc(l); + s := s + n mod 10; + n := n div 10 + until n = 0; + writeln(l, ' ', s) +end. -- cgit 1.4.1