mirror of
https://github.com/tiennm99/CodePower.git
synced 2026-06-06 06:09:52 +00:00
chore: migrate
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
a = int(input())
|
||||
b = int(input())
|
||||
print(a // b)
|
||||
print(format(a / b, '.3f'))
|
||||
@@ -0,0 +1,8 @@
|
||||
def is_leap(year):
|
||||
leap = False
|
||||
if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
|
||||
leap = True
|
||||
return leap
|
||||
|
||||
year = int(input())
|
||||
print(is_leap(year))
|
||||
@@ -0,0 +1 @@
|
||||
print("Hello World!")
|
||||
@@ -0,0 +1,10 @@
|
||||
n = int(input())
|
||||
if n%2 != 0:
|
||||
print("Weird")
|
||||
else:
|
||||
if n >= 2 and n <= 5:
|
||||
print("Not Weird")
|
||||
elif n >= 6 and n <=20:
|
||||
print("Weird")
|
||||
elif n > 20:
|
||||
print("Not Weird")
|
||||
@@ -0,0 +1,8 @@
|
||||
a1,b1,c1,a2,b2,a3 = input().split()
|
||||
a1 = float(a1)
|
||||
b1 = float(b1)
|
||||
c1 = float(c1)
|
||||
a2 = float(a2)
|
||||
b2 = float(b2)
|
||||
a3 = float(a3)
|
||||
print(((a1 + b1 + c1) + (a2 + b2) * 2 + a3 * 3) / 10)
|
||||
@@ -0,0 +1,5 @@
|
||||
a = int(input())
|
||||
b = int(input())
|
||||
print(a + b)
|
||||
print(a - b)
|
||||
print(a * b)
|
||||
@@ -0,0 +1,5 @@
|
||||
n = int(input())
|
||||
for i in range(n):
|
||||
for j in range(n):
|
||||
print('*', end = ' ')
|
||||
print()
|
||||
@@ -0,0 +1,5 @@
|
||||
sum = 0
|
||||
n = int(input())
|
||||
for i in range (1, n + 1):
|
||||
sum += i
|
||||
print(sum)
|
||||
Reference in New Issue
Block a user