ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1083. Factorials!!!

Wrong Answer !!!
Posted by Yeo Kern Sin 20 Feb 2002 07:39
Given the definition

"n!!...!=n(n-k)(n-2k)...(n mod k), if k doesn’t divide n,
n!!...!=n(n-k)(n-2k)...k, if k divides n (There are k marks ! in the
both cases)."

when n = k what should be the answer?
Should it be
   = n * k (cos k divides n)
or just
   = n

when k > n what should be the answer?
Should it be
   = n * (n mod k)
   = n * n

or just
   = n

Anyone got any idea?