Skip to content

Commit 591b5ed

Browse files
Merge pull request #51 from KoyanagiHitoshi/dev
Dev
2 parents 3f20a43 + a057152 commit 591b5ed

File tree

170 files changed

+533
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+533
-511
lines changed

CHANGELOG.md

+5

code/answer_2-2-12.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
a, b = map(int, input().split())
2-
c, d = map(int, input().split())
3-
print(a*d-b*c)
1+
a, b = map(int, input().split("x"))
2+
print(a*b)

code/answer_2-2-13.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
a, b, c, d = map(int, input().split())
2-
print((a+b)*(c-d))
3-
print("Takahashi")
1+
a, b = map(int, input().split("x"))
2+
print(a*b)

code/answer_2-2-14.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
R = int(input())
2-
print(2*3.14*R)
1+
a, b = map(int, input().split())
2+
c, d = map(int, input().split())
3+
print(a*d-b*c)

code/answer_2-2-15.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
A, B, C = map(int, input().split())
2-
print(2*(A*B+B*C+C*A))
1+
a, b, c, d = map(int, input().split())
2+
print((a+b)*(c-d))
3+
print("Takahashi")

code/answer_2-2-16.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
N = int(input())
2-
A = int(input())
3-
print(N*N-A)
1+
R = int(input())
2+
print(2*3.14*R)

code/answer_2-2-17.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
n, m = map(int, input().split())
2-
print((n-1)*(m-1))
1+
A, B, C = map(int, input().split())
2+
print(2*(A*B+B*C+C*A))

code/answer_2-2-18.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
A, B = map(int, input().split())
2-
print(A*B-(A+B-1))
1+
N = int(input())
2+
A = int(input())
3+
print(N*N-A)

code/answer_2-2-19.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
H, W = map(int, input().split())
2-
h, w = map(int, input().split())
3-
print((H-h)*(W-w))
1+
n, m = map(int, input().split())
2+
print((n-1)*(m-1))

code/answer_2-2-20.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
R = int(input())
2-
G = int(input())
3-
print(2*G-R)
1+
A, B = map(int, input().split())
2+
print(A*B-(A+B-1))

code/answer_2-2-21.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
A, B = map(int, input().split())
2-
print((2*A+100)-B)
1+
H, W = map(int, input().split())
2+
h, w = map(int, input().split())
3+
print((H-h)*(W-w))

code/answer_2-2-22.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import math
2-
N = int(input())
3-
print(math.factorial(N))
1+
R = int(input())
2+
G = int(input())
3+
print(2*G-R)

code/answer_2-2-23.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N = int(input())
2-
print(2**N)
1+
A, B = map(int, input().split())
2+
print((2*A+100)-B)

code/answer_2-2-24.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
A, B = map(int, input().split())
2-
print(A**B)
1+
import math
2+
N = int(input())
3+
print(math.factorial(N))

code/answer_2-2-25.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, B = map(int, input().split())
2-
print(A**B+B**A)
1+
N = int(input())
2+
print(2**N)

code/answer_2-2-26.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
a = int(input())
2-
print(a+a**2+a**3)
1+
A, B = map(int, input().split())
2+
print(A**B)

code/answer_2-2-27.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
r = int(input())
2-
print(3*(r**2))
1+
A, B = map(int, input().split())
2+
print(A**B+B**A)

code/answer_2-2-28.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
r = int(input())
2-
print(r**2)
1+
A, B = map(int, input().split())
2+
print((A+B)**2)

code/answer_2-2-29.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, B = map(int, input().split())
2-
print(32**(A-B))
1+
a = int(input())
2+
print(a+a**2+a**3)

code/answer_2-2-30.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N = int(input())
2-
print(N**3)
1+
r = int(input())
2+
print(3*(r**2))

code/answer_2-2-31.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
H = int(input())
2-
print((H*(12800000+H))**(1/2))
1+
r = int(input())
2+
print(r**2)

code/answer_2-2-32.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
H = int(input())
2-
print((H*(12800000+H))**0.5)
1+
A, B = map(int, input().split())
2+
print(32**(A-B))

code/answer_2-2-33.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
D = int(input())
2-
print(D/100)
1+
N = int(input())
2+
print(N**3)

code/answer_2-2-34.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, B = map(int, input().split())
2-
print((A-B)/3+B)
1+
H = int(input())
2+
print((H*(12800000+H))**(1/2))

code/answer_2-2-35.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
T, X = map(int, input().split())
2-
print(T/X)
1+
H = int(input())
2+
print((H*(12800000+H))**0.5)

code/answer_2-2-36.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, B = map(int, input().split())
2-
print(A*B/100)
1+
D = int(input())
2+
print(D/100)

code/answer_2-2-37.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
A, B = map(int, input().split())
2-
print((1-B/A)*100)
2+
print((A-B)/3+B)

code/answer_2-2-38.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
AB, BC, CA = map(int, input().split())
2-
print(AB*BC//2)
1+
T, X = map(int, input().split())
2+
print(T/X)

code/answer_2-2-39.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
a, b, h = [int(input()) for i in range(3)]
2-
print((a+b)*h//2)
1+
A, B = map(int, input().split())
2+
print(A*B/100)

code/answer_2-2-40.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
X, Y = map(int, input().split())
2-
print(X+Y//2)
1+
A, B = map(int, input().split())
2+
print((1-B/A)*100)

code/answer_2-2-41.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
s1, e1 = map(int, input().split())
2-
s2, e2 = map(int, input().split())
3-
s3, e3 = map(int, input().split())
4-
print((s1*e1+s2*e2+s3*e3)//10)
1+
AB, BC, CA = map(int, input().split())
2+
print(AB*BC//2)

code/answer_2-2-42.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N = int(input())
2-
print(N*800-N//15*200)
1+
a, b, h = [int(input()) for i in range(3)]
2+
print((a+b)*h//2)

code/answer_2-2-43.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N = int(input())
2-
print((N+99)//100)
1+
X, Y = map(int, input().split())
2+
print(X+Y//2)

code/answer_2-2-44.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
N, W = map(int, input().split())
2-
print(N//W)
1+
s1, e1 = map(int, input().split())
2+
s2, e2 = map(int, input().split())
3+
s3, e3 = map(int, input().split())
4+
print((s1*e1+s2*e2+s3*e3)//10)

code/answer_2-2-45.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
x, y = map(int, input().split())
2-
print(y//x)
1+
N = int(input())
2+
print(N*800-N//15*200)

code/answer_2-2-46.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
N = int(input())
2-
print(N//3)
2+
print((N+99)//100)

code/answer_2-2-47.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, P = map(int, input().split())
2-
print((3*A+P)//2)
1+
N, W = map(int, input().split())
2+
print(N//W)

code/answer_2-2-48.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
X = int(input())
2-
print(X//10)
1+
x, y = map(int, input().split())
2+
print(y//x)

code/answer_2-2-49.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import math
2-
a, b = map(int, input().split())
3-
print(math.ceil((a+b)/2))
1+
N = int(input())
2+
print(N//3)

code/answer_2-2-50.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import math
2-
N = int(input())
3-
print(math.ceil(N/2))
1+
A, P = map(int, input().split())
2+
print((3*A+P)//2)

code/answer_2-2-51.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import math
2-
N = int(input())
3-
print(math.ceil(N/2))
1+
X = int(input())
2+
print(X//10)

code/answer_2-2-52.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import math
2-
A, B = map(int, input().split())
3-
print(math.ceil(B/A))
2+
a, b = map(int, input().split())
3+
print(math.ceil((a+b)/2))

code/answer_2-2-53.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
import math
12
N = int(input())
2-
print((N % 12)+1)
3+
print(math.ceil(N/2))

code/answer_2-2-54.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
A, B = map(int, input().split())
2-
print((A+B) % 24)
1+
import math
2+
N = int(input())
3+
print(math.ceil(N/2))

code/answer_2-2-55.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
X, A, B = [int(input()) for i in range(3)]
2-
print((X-A) % B)
1+
import math
2+
A, B = map(int, input().split())
3+
print(math.ceil(B/A))

code/answer_2-2-56.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
X = int(input())
2-
print(100-(X % 100))
1+
N = int(input())
2+
print((N % 12)+1)

code/answer_2-2-57.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
R = int(input())
2-
print(100-(R % 100))
1+
A, B = map(int, input().split())
2+
print((A+B) % 24)

code/answer_2-2-58.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N, K, A = map(int, input().split())
2-
print(((A+K-2) % N)+1)
1+
X, A, B = [int(input()) for i in range(3)]
2+
print((X-A) % B)

code/answer_2-2-59.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
A, B, C = map(int, input().split())
2-
print((A*B*C) % (10**9+7))
1+
X = int(input())
2+
print(100-(X % 100))

code/answer_2-2-60.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
N = int(input())
2-
print(N % 998244353)
1+
R = int(input())
2+
print(100-(R % 100))

code/answer_2-2-61.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
N, K, A = map(int, input().split())
2+
print(((A+K-2) % N)+1)

code/answer_2-2-62.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
A, B, C = map(int, input().split())
2+
print((A*B*C) % (10**9+7))

code/answer_2-2-63.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
N = int(input())
2+
print(N % 998244353)

code/answer_4-1-120.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
a, b = map(int, input().split())
2-
graph = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8],
3-
[4, 9], [5, 10], [5, 11], [6, 12], [6, 13], [7, 14], [7, 15]]
4-
if [a, b] in graph:
1+
A = list(map(int, input().split()))
2+
if A in [[2, 1, 3, 4, 5], [1, 3, 2, 4, 5], [1, 2, 4, 3, 5], [1, 2, 3, 5, 4]]:
53
print("Yes")
64
else:
75
print("No")

code/answer_4-1-121.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
A, B = map(int, input().split())
2-
X = {(1, 2), (2, 3), (4, 5), (5, 6), (7, 8), (8, 9)}
3-
if (A, B) in X:
1+
a, b = map(int, input().split())
2+
graph = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8],
3+
[4, 9], [5, 10], [5, 11], [6, 12], [6, 13], [7, 14], [7, 15]]
4+
if [a, b] in graph:
45
print("Yes")
56
else:
67
print("No")

code/answer_4-1-122.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
a, b = map(int, input().split())
2-
graph = {(1, 2), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7), (4, 8),
3-
(4, 9), (5, 10), (5, 11), (6, 12), (6, 13), (7, 14), (7, 15)}
4-
if (a, b) in graph:
1+
A, B = map(int, input().split())
2+
X = {(1, 2), (2, 3), (4, 5), (5, 6), (7, 8), (8, 9)}
3+
if (A, B) in X:
54
print("Yes")
65
else:
76
print("No")

code/answer_4-1-123.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
A, B, C = map(int, input().split())
2-
if A <= C <= B:
1+
a, b = map(int, input().split())
2+
graph = {(1, 2), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7), (4, 8),
3+
(4, 9), (5, 10), (5, 11), (6, 12), (6, 13), (7, 14), (7, 15)}
4+
if (a, b) in graph:
35
print("Yes")
46
else:
57
print("No")

code/answer_4-1-124.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
N = int(input())
2-
if -2**31 <= N < 2**31:
1+
A, B, C = map(int, input().split())
2+
if A <= C <= B:
33
print("Yes")
44
else:
55
print("No")

code/answer_4-1-125.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
X, Y = map(int, input().split())
2-
if -3 <= Y-X <= 2:
1+
N = int(input())
2+
if -2**31 <= N < 2**31:
33
print("Yes")
44
else:
55
print("No")

code/answer_4-1-126.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a, b, c = map(int, input().split())
2-
if a <= b <= c or c <= b <= a:
1+
X, Y = map(int, input().split())
2+
if -3 <= Y-X <= 2:
33
print("Yes")
44
else:
55
print("No")

code/answer_4-1-127.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
N, X, Y, Z = map(int, input().split())
2-
if X < Z < Y or X > Z > Y:
1+
a, b, c = map(int, input().split())
2+
if a <= b <= c or c <= b <= a:
33
print("Yes")
44
else:
55
print("No")

code/answer_4-1-128.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
X = int(input())
2-
if 0 <= X < 40:
3-
print(40-X)
4-
elif 40 <= X < 70:
5-
print(70-X)
6-
elif 70 <= X < 90:
7-
print(90-X)
1+
N, X, Y, Z = map(int, input().split())
2+
if X < Z < Y or X > Z > Y:
3+
print("Yes")
84
else:
9-
print("expert")
5+
print("No")

code/answer_4-1-129.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
a, b, c, d = map(int, input())
2-
if a == b == c or b == c == d:
3-
print("Yes")
1+
X = int(input())
2+
if 0 <= X < 40:
3+
print(40-X)
4+
elif 40 <= X < 70:
5+
print(70-X)
6+
elif 70 <= X < 90:
7+
print(90-X)
48
else:
5-
print("No")
9+
print("expert")

code/answer_4-1-130.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
a, b, c, d = map(int, input())
2-
if a != b != c != d:
3-
print("Good")
2+
if a == b == c or b == c == d:
3+
print("Yes")
44
else:
5-
print("Bad")
5+
print("No")

0 commit comments

Comments
 (0)