diff options
Diffstat (limited to 'codechef/bitobyt.lisp')
-rw-r--r-- | codechef/bitobyt.lisp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/codechef/bitobyt.lisp b/codechef/bitobyt.lisp new file mode 100644 index 0000000..6a26b93 --- /dev/null +++ b/codechef/bitobyt.lisp @@ -0,0 +1,10 @@ +(let ((tests (read))) + (dotimes (i tests) + (let ((n (read))) + (if (= n 0) + (format t "1 0 0~&") + (multiple-value-bind (d m) (truncate (1- n) 26) + (format t (cond ((< m 2) "~a 0 0~&") + ((< m 10) "0 ~a 0~&") + (t "0 0 ~a~&")) + (expt 2 d))))))) |