Advertisement
JoshTEC

jamie

Mar 29th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. 1:
  2.  
  3. # Read an integer:
  4. # a = int(input())
  5. # Print a value:
  6. # print(a)
  7. i1 = int(input())
  8. i2 = int(input())
  9.  
  10. if(i1 < i2):
  11. print(i1)
  12. else:
  13. print(i2)
  14.  
  15.  
  16. 2:
  17. # Read an integer:
  18. # a = int(input())
  19. # Print a value:
  20. # print(a)
  21. x = int(input())
  22.  
  23. if(x % 2):
  24. print(1)
  25. elif(x == 0):
  26. print(0)
  27. else:
  28. print(-1)
  29.  
  30. 3:
  31. # Read an integer:
  32. # a = int(input())
  33. # Print a value:
  34. # print(a)
  35.  
  36. i1 = int(input())
  37. i2 = int(input())
  38. i3 = int(input())
  39.  
  40. if(i1 < i3 and i1 < i2):
  41. print(i1)
  42. elif(i2 < i1 and i2 < i3):
  43. print(i2)
  44. else:
  45. print(i3)
  46.  
  47. 4:
  48. # Read an integer:
  49. # a = int(input())
  50. # Print a value:
  51. # print(a)
  52.  
  53. def leapyr(n):
  54. if n % 400 == 0:
  55. return "LEAP"
  56. if n % 100 == 0:
  57. return "COMMON"
  58. if n % 4 == 0:
  59. return "LEAP"
  60. else:
  61. return "COMMON"
  62.  
  63. test = int(input())
  64. print(leapyr(test))
  65.  
  66. 5:
  67. # Read an integer:
  68. # a = int(input())
  69. # Print a value:
  70. # print(a)
  71.  
  72. i1 = int(input())
  73. i2 = int(input())
  74. i3 = int(input())
  75.  
  76. if(i1 == i2 and i2 == i3):
  77. print(3)
  78. elif((i1 == i2 and i1 != i3) or (i2 == i3 and i3 != i1) or (i1 == i3 and i3 != i2)):
  79. print(2)
  80. else:
  81. print(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement