SHARE
TWEET

Untitled

a guest Oct 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. N = int(input())
  2. M = int(input())
  3. K = int(input())
  4. a = []
  5. c = []
  6. b  = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  7. for i in range(N):
  8.   for j in range(M):
  9.     a.append((i + j) %K)
  10.  
  11. for i in range(len(a)):
  12.   b[a[i]] += 1
  13.  
  14. for i in range(len(b)):
  15.   if b[i]!=0:
  16.     c.append(b[i])
  17.  
  18. for i in c:
  19.   print(i, end = " ")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top