Last active
August 30, 2019 13:48
-
-
Save chokkoyamada/771f9cecacab63dc50422e3105b8a4bf to your computer and use it in GitHub Desktop.
aoj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_list = [] | |
while True: | |
pair = list(map(int, input().split(' '))) | |
if pair[0] == 0 and pair[1] == 0: | |
break | |
input_list.append(pair) | |
for pair in input_list: | |
h = pair[0] | |
w = pair[1] | |
for y in range(h): | |
for x in range(w): | |
print('#', end='') | |
print('') | |
print() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_list = [] | |
while True: | |
pair = list(map(int, input().split(' '))) | |
if pair[0] == 0 and pair[1] == 0: | |
break | |
input_list.append(pair) | |
for pair in input_list: | |
h = pair[0] | |
w = pair[1] | |
for y in range(h): | |
if y == 0 or y == h - 1: | |
for x in range(w): | |
print('#', end='') | |
else: | |
for x in range(w): | |
if x == 0 or x == w - 1: | |
print('#', end='') | |
else: | |
print('.', end='') | |
print() | |
print() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_list = [] | |
while True: | |
pair = list(map(int, input().split(' '))) | |
if pair[0] == 0 and pair[1] == 0: | |
break | |
input_list.append(pair) | |
for pair in input_list: | |
h = pair[0] | |
w = pair[1] | |
start_mark = '#' | |
m = start_mark | |
for y in range(h): | |
for x in range(w): | |
print(m, end='') | |
if m == '#': | |
m = '.' | |
else: | |
m = '#' | |
print() | |
if start_mark == '#': | |
m = '.' | |
start_mark = m | |
else: | |
m = '#' | |
start_mark = m | |
print() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = int(input()) | |
for i in range(1, num + 1): | |
x = i | |
if x % 3 == 0: | |
print(f' {i}', end='') | |
elif x % 10 == 3: | |
print(f' {i}', end='') | |
else: | |
while x > 0: | |
x = x // 10 | |
if x % 10 == 3: | |
print(f' {i}', end='') | |
break | |
print() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = int(input()) | |
input_list = list(map(int, input().split(' '))) | |
print(' '.join(map(str, reversed(input_list)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment