Skip to content

Commit a5bde94

Browse files
Merge pull request #43 from KoyanagiHitoshi/dev
Dev
2 parents 29d6954 + 9b39d5a commit a5bde94

File tree

157 files changed

+594
-557
lines changed

Some content is hidden

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

157 files changed

+594
-557
lines changed

Diff for: CHANGELOG.md

+5

Diff for: code/answer_2-2-57.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+
R = int(input())
2+
print(100-(R % 100))

Diff for: code/answer_2-2-58.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+
N, K, A = map(int, input().split())
2+
print(((A+K-2) % N)+1)

Diff for: code/answer_2-2-59.py

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

Diff for: code/answer_2-2-60.py

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

Diff for: code/answer_4-1-100.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
N = input()
2-
if "7" in N:
3-
print("Yes")
1+
X = input()
2+
if X in "753":
3+
print("YES")
44
else:
5-
print("No")
5+
print("NO")

Diff for: code/answer_4-1-101.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
N = input()
2-
if "9" in N:
2+
if "7" in N:
33
print("Yes")
44
else:
55
print("No")

Diff for: code/answer_4-1-102.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
N = input()
2-
if N in "369":
3-
print("YES")
2+
if "9" in N:
3+
print("Yes")
44
else:
5-
print("NO")
5+
print("No")

Diff for: code/answer_4-1-103.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a = input()
2-
if a in "abcdefghijklmnopqrstuvwxyz":
3-
print("a")
1+
N = input()
2+
if N in "369":
3+
print("YES")
44
else:
5-
print("A")
5+
print("NO")

Diff for: code/answer_4-1-104.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
a = input()
2-
if a in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
3-
print("A")
4-
else:
2+
if a in "abcdefghijklmnopqrstuvwxyz":
53
print("a")
4+
else:
5+
print("A")

Diff for: code/answer_4-1-105.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
N = int(input())
2-
S = input()
3-
if "ab" in S or "ba" in S:
4-
print("Yes")
1+
a = input()
2+
if a in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
3+
print("A")
54
else:
6-
print("No")
5+
print("a")

Diff for: code/answer_4-1-106.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
N = int(input())
22
S = input()
3-
if "o" in S and "x" not in S:
3+
if "ab" in S or "ba" in S:
44
print("Yes")
55
else:
66
print("No")

Diff for: code/answer_4-1-107.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
N = int(input())
22
S = input()
3-
if "MM" in S or "FF" in S:
4-
print("No")
5-
else:
3+
if "o" in S and "x" not in S:
64
print("Yes")
5+
else:
6+
print("No")

Diff for: code/answer_4-1-108.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
A, B = input().split()
2-
if "2" in A or "2" in B:
1+
N = int(input())
2+
S = input()
3+
if "MM" in S or "FF" in S:
34
print("No")
45
else:
56
print("Yes")

Diff for: code/answer_4-1-109.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
AB = input()
2-
if "2" in AB:
1+
A, B = input().split()
2+
if "2" in A or "2" in B:
33
print("No")
44
else:
55
print("Yes")

Diff for: code/answer_4-1-110.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
S = input()
2-
if S in ["ACE", "BDF", "CEG", "DFA", "EGB", "FAC", "GBD"]:
3-
print("Yes")
4-
else:
1+
AB = input()
2+
if "2" in AB:
53
print("No")
4+
else:
5+
print("Yes")

Diff for: code/answer_4-1-111.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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+
S = input()
2+
if S in ["ACE", "BDF", "CEG", "DFA", "EGB", "FAC", "GBD"]:
43
print("Yes")
54
else:
65
print("No")

Diff for: code/answer_4-1-112.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")

Diff for: code/answer_4-1-113.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")

Diff for: code/answer_4-1-114.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")

Diff for: code/answer_4-1-115.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")

Diff for: code/answer_4-1-116.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")

Diff for: code/answer_4-1-117.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")

Diff for: code/answer_4-1-118.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")

Diff for: code/answer_4-1-119.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")

Diff for: code/answer_4-1-120.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")

Diff for: code/answer_4-1-121.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")

Diff for: code/answer_4-1-122.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")

Diff for: code/answer_4-1-123.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
A, B = map(int, input().split())
2-
if A <= B <= 6*A:
3-
print("Yes")
1+
a, b, c, d = map(int, input())
2+
if a != b != c != d:
3+
print("Good")
44
else:
5-
print("No")
5+
print("Bad")

Diff for: code/answer_4-1-124.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
A, B = map(int, input().split())
2-
if 1 <= A <= 9 and 1 <= B <= 9:
3-
print(A*B)
2+
if A <= B <= 6*A:
3+
print("Yes")
44
else:
5-
print(-1)
5+
print("No")

Diff for: code/answer_4-1-125.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
V, T, S, D = map(int, input().split())
2-
if V*T <= D <= V*S:
3-
print("No")
1+
A, B = map(int, input().split())
2+
if 1 <= A <= 9 and 1 <= B <= 9:
3+
print(A*B)
44
else:
5-
print("Yes")
5+
print(-1)

Diff for: code/answer_4-1-126.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
A, B, X = map(int, input().split())
2-
if A <= X <= A+B:
3-
print("YES")
1+
V, T, S, D = map(int, input().split())
2+
if V*T <= D <= V*S:
3+
print("No")
44
else:
5-
print("NO")
5+
print("Yes")

Diff for: code/answer_4-1-127.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
A, B, X = map(int, input().split())
2-
if 0 <= X-A <= B:
2+
if A <= X <= A+B:
33
print("YES")
44
else:
55
print("NO")

Diff for: code/answer_4-1-128.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
S, T, X = map(int, input().split())
2-
if S < T:
3-
if S <= X < T:
4-
print("Yes")
5-
else:
6-
print("No")
1+
A, B, X = map(int, input().split())
2+
if 0 <= X-A <= B:
3+
print("YES")
74
else:
8-
if X < T or S <= X:
9-
print("Yes")
10-
else:
11-
print("No")
5+
print("NO")

Diff for: code/answer_4-1-129.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
n = int(input())
2-
if 2 <= n <= 4:
3-
print("No")
1+
S, T, X = map(int, input().split())
2+
if S < T:
3+
if S <= X < T:
4+
print("Yes")
5+
else:
6+
print("No")
47
else:
5-
print("Yes")
8+
if X < T or S <= X:
9+
print("Yes")
10+
else:
11+
print("No")

Diff for: code/answer_4-1-130.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a, b, c = input()
2-
if a == b == c:
3-
print("Won")
1+
n = int(input())
2+
if 2 <= n <= 4:
3+
print("No")
44
else:
5-
print("Lost")
5+
print("Yes")

Diff for: code/answer_4-1-131.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a, b, c, d = input()
2-
if a == b == c or b == c == d:
3-
print("Yes")
1+
a, b, c = input()
2+
if a == b == c:
3+
print("Won")
44
else:
5-
print("No")
5+
print("Lost")

Diff for: code/answer_4-1-132.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
S = input()
2-
if "ABC001" <= S <= "ABC349" and S != "ABC316":
1+
a, b, c, d = input()
2+
if a == b == c or b == c == d:
33
print("Yes")
44
else:
55
print("No")

Diff for: code/answer_4-1-133.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
a, b, c, d = input()
2-
if a != b != c != d:
3-
print("Good")
1+
S = input()
2+
if "ABC001" <= S <= "ABC349" and S != "ABC316":
3+
print("Yes")
44
else:
5-
print("Bad")
5+
print("No")

Diff for: code/answer_4-1-134.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
a, b, c, d = input()
2+
if a != b != c != d:
3+
print("Good")
4+
else:
5+
print("Bad")

Diff for: code/answer_4-1-36.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
a, b = map(int, input().split())
2-
if 12 < a:
3-
print(b)
4-
elif 5 < a:
5-
print(b//2)
1+
R = int(input())
2+
if R < 100:
3+
print(100-R)
4+
elif R < 200:
5+
print(200-R)
66
else:
7-
print(0)
7+
print(300-R)

0 commit comments

Comments
 (0)