Skip to content

Commit 14e5cbd

Browse files
author
IsHYuhi
committed
add greens
1 parent e797ea9 commit 14e5cbd

File tree

3 files changed

+78
-3
lines changed

3 files changed

+78
-3
lines changed

ABC/ABC051/C.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from collections import deque
2+
sx, sy, tx, ty = map(int, input().split())
3+
ans = ''
4+
5+
def move(right, up):
6+
global ans
7+
while right and up:
8+
while up:
9+
s = up.popleft()
10+
ans += s
11+
12+
while right:
13+
s = right.popleft()
14+
ans += s
15+
16+
right = deque(['R']*(tx-sx))
17+
up = deque(['U']*(ty-sy))
18+
move(right, up)
19+
20+
left = deque(['L']*abs(sx-tx))
21+
down = deque(['D']*abs(sy-ty))
22+
move(left, down)
23+
24+
25+
right = deque(['R']*(tx-sx+1))
26+
up = deque(['U']*(ty-sy+1))
27+
28+
ans += 'L'
29+
move(right, up)
30+
ans += 'D'
31+
32+
left = deque(['L']*(abs(sx-tx)+1))
33+
down = deque(['D']*(abs(sy-ty)+1))
34+
35+
ans += 'R'
36+
move(left, down)
37+
ans += 'U'
38+
39+
# print(len(ans))
40+
print(ans)

ABC/ABC052/C.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import math
2+
3+
def factorization(n):
4+
arr = []
5+
temp = n
6+
for i in range(2, int(-(-n**0.5//1))+1):
7+
if temp%i==0:
8+
cnt=0
9+
while temp%i==0:
10+
cnt+=1
11+
temp //= i
12+
arr.append([i, cnt])
13+
14+
if temp!=1:
15+
arr.append([temp, 1])
16+
17+
if arr==[]:
18+
arr.append([n, 1])
19+
20+
return arr
21+
22+
n = int(input())
23+
24+
ex = [1]*1001
25+
ans = 1
26+
27+
for i in range(2, n+1):
28+
n_fact = factorization(i)
29+
for j, k in n_fact:
30+
ex[j] += k
31+
32+
for i in ex:
33+
ans *= i
34+
ans %= (10**9+7)
35+
print(ans)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AtCoderの問題をpython3で解いたものになります。AC確認は行っ
88
## [AtCoder Beginner Contest](ABC)
99
| Problem A | Problem B | Problem C | Problem D | Problem E | Problem F |
1010
|:---:|:---:|:---:|:---:|:---:|:---:|
11-
|179/179 <img align="center" src="https://img.shields.io/badge/Completed!-green?style=for-the-badge"/>|179/179 <img align="center" src="https://img.shields.io/badge/Completed!-green?style=for-the-badge"/>|132/179|29/173|4/54|0/54|
11+
|179/179 <img align="center" src="https://img.shields.io/badge/Completed!-green?style=for-the-badge"/>|179/179 <img align="center" src="https://img.shields.io/badge/Completed!-green?style=for-the-badge"/>|135/179|29/173|4/54|0/54|
1212

1313

1414
### ABC001 - ABC041
@@ -49,8 +49,8 @@ AtCoderの問題をpython3で解いたものになります。AC確認は行っ
4949
|[ABC048](ABC/ABC048)|[&check;](ABC/ABC048/A.py)|[&check;](ABC/ABC048/B.py)||||[ABC090](ABC/ABC090)|[&check;](ABC/ABC090/A.py)|[&check;](ABC/ABC090/B.py)|[&check;](ABC/ABC090/C.py)|
5050
|[ABC049](ABC/ABC049)|[&check;](ABC/ABC049/A.py)|[&check;](ABC/ABC049/B.py)|[&check;](ABC/ABC049/C.py)|||[ABC091](ABC/ABC091)|[&check;](ABC/ABC091/A.py)|[&check;](ABC/ABC091/B.py)||
5151
|[ABC050](ABC/ABC050)|[&check;](ABC/ABC050/A.py)|[&check;](ABC/ABC050/B.py)|[&check;](ABC/ABC050/C.py)|||[ABC092](ABC/ABC092)|[&check;](ABC/ABC092/A.py)|[&check;](ABC/ABC092/B.py)|[&check;](ABC/ABC092/C.py)||
52-
|[ABC051](ABC/ABC051)|[&check;](ABC/ABC051/A.py)|[&check;](ABC/ABC051/B.py)||||[ABC093](ABC/ABC093)|[&check;](ABC/ABC093/A.py)|[&check;](ABC/ABC093/B.py)|[&check;](ABC/ABC093/C.py)||
53-
|[ABC052](ABC/ABC052)|[&check;](ABC/ABC052/A.py)|[&check;](ABC/ABC052/B.py)||||[ABC094](ABC/ABC094)|[&check;](ABC/ABC094/A.py)|[&check;](ABC/ABC094/B.py)|[&check;](ABC/ABC094/C.py)||
52+
|[ABC051](ABC/ABC051)|[&check;](ABC/ABC051/A.py)|[&check;](ABC/ABC051/B.py)|[&check;](ABC/ABC051/C.py)|||[ABC093](ABC/ABC093)|[&check;](ABC/ABC093/A.py)|[&check;](ABC/ABC093/B.py)|[&check;](ABC/ABC093/C.py)||
53+
|[ABC052](ABC/ABC052)|[&check;](ABC/ABC052/A.py)|[&check;](ABC/ABC052/B.py)|[&check;](ABC/ABC052/C.py)|||[ABC094](ABC/ABC094)|[&check;](ABC/ABC094/A.py)|[&check;](ABC/ABC094/B.py)|[&check;](ABC/ABC094/C.py)||
5454
|[ABC053](ABC/ABC053)|[&check;](ABC/ABC053/A.py)|[&check;](ABC/ABC053/B.py)|[&check;](ABC/ABC053/C.py)|||[ABC095](ABC/ABC095)|[&check;](ABC/ABC095/A.py)|[&check;](ABC/ABC095/B.py)|[&check;](ABC/ABC095/C.py)||
5555
|[ABC054](ABC/ABC054)|[&check;](ABC/ABC054/A.py)|[&check;](ABC/ABC054/A.py)|[&check;](ABC/ABC054/C.py)|||[ABC096](ABC/ABC096)|[&check;](ABC/ABC096/A.py)|[&check;](ABC/ABC096/B.py)|[&check;](ABC/ABC096/C.py)||
5656
|[ABC055](ABC/ABC055)|[&check;](ABC/ABC055/A.py)|[&check;](ABC/ABC055/B.py)|[&check;](ABC/ABC055/C.py)|||[ABC097](ABC/ABC097)|[&check;](ABC/ABC097/A.py)|[&check;](ABC/ABC097/B.py)|||

0 commit comments

Comments
 (0)