daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Jun 24th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input())
  2. people = []
  3. song = ["Happy", "birthday", "to", "you", "Happy", "birthday", "to", "you", "Happy", "birthday", "to", "Rujia", "Happy", "birthday", "to", "you"]
  4. for i in range(n):
  5.     people.append(input().title())
  6. i = j = 0
  7. flag = False
  8. while True:
  9.     print("{:s}: {:s}".format(people[i], song[j]))
  10.     if (i == n - 1):
  11.         flag = True
  12.     if (j == (len(song) - 1) and flag):
  13.         break;
  14.     i += 1
  15.     j += 1
  16.     if (i >= n):
  17.         i = 0
  18.     if (j >= len(song)):
  19.         j = 0
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