fork download
  1. # http://c...content-available-to-author-only...e.com/questions/35038/generate-the-group-table-for-z-n/49109#49109
  2.  
  3. #68
  4. def f(n):
  5. l=range(n)
  6. for i in l:print''.join(map(str,l[i:]+l[:i]))
  7.  
  8. #67
  9. def g(n):
  10. l=range(n)
  11. for i in l:print''.join(`l[i:]+l[:i]`)[1::3]
  12.  
  13. f(5)
  14. print
  15. g(5)
Success #stdin #stdout 0s 7692KB
stdin
Standard input is empty
stdout
01234
12340
23401
34012
40123

01234
12340
23401
34012
40123