Skip to content

Commit 2f577df

Browse files
author
IsHYuhi
committed
add ABC179
1 parent 97fea75 commit 2f577df

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

ABC/ABC179/A.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
s = input()
2+
3+
if s[-1]=='s':
4+
print(s+'es')
5+
else:
6+
print(s+'s')

ABC/ABC179/B.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
n = int(input())
2+
3+
d = [list(map(int, input().split())) for i in range(n)]
4+
count = 0
5+
for i, j in d:
6+
if i==j:
7+
count += 1
8+
else:
9+
count = 0
10+
11+
if count>=3:
12+
print('Yes')
13+
exit()
14+
print('No')

ABC/ABC179/C.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ans = 0
2+
n = int(input())
3+
for a in range(1, n):
4+
for b in range(a, n):
5+
if a*b>=n:
6+
break
7+
if a==b:
8+
ans+=1
9+
else:
10+
ans += 2
11+
print(ans)

0 commit comments

Comments
 (0)