Jump to...
redirecting...

Log for OwO

Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
???
enum = [
[
'*****',
'* *',
'* *',
'* *',
'*****',
],
[
' *',
' *',
' *',
' *',
' *',
],
[
'*****',
' *',
'*****',
'* ',
'*****',
],
[
'*****',
' *',
'*****',
' *',
'*****',
],
[
'* *',
'* *',
'*****',
' *',
' *',
],
[
'*****',
'* ',
'*****',
' *',
'*****',
],
[
'*****',
'* ',
'*****',
'* *',
'*****',
],
[
'*****',
' *',
' *',
' *',
' *',
],
[
'*****',
'* *',
'*****',
'* *',
'*****',
],
[
'*****',
'* *',
'*****',
' *',
'*****',
],
]


def concat(enum1, enum2):
result = list()
for i in range(len(enum1)):
result.append(enum1[i] + ' ' + enum2[i])

return result


_input = [int(_) for _ in input()]

result = enum[_input.pop(0)]
for num in _input:
result = concat(result, enum[num])

print('\n'.join(result))
enum = [
[
'*****',
'* *',
'* *',
'* *',
'*****',
],
[
' *',
' *',
' *',
' *',
' *',
],
[
'*****',
' *',
'*****',
'* ',
'*****',
],
[
'*****',
' *',
'*****',
' *',
'*****',
],
[
'* *',
'* *',
'*****',
' *',
' *',
],
[
'*****',
'* ',
'*****',
' *',
'*****',
],
[
'*****',
'* ',
'*****',
'* *',
'*****',
],
[
'*****',
' *',
' *',
' *',
' *',
],
[
'*****',
'* *',
'*****',
'* *',
'*****',
],
[
'*****',
'* *',
'*****',
' *',
'*****',
],
]


def concat(enum1, enum2):
result = list()
for i in range(len(enum1)):
result.append(enum1[i] + ' ' + enum2[i])

return result


_input = [8,7,8,7]

result = enum[_input.pop(0)]
for num in _input:
result = concat(result, enum[num])

print('\n'.join(result))
year, month = 2021, 05

print('SU\tMO\tTU\tWE\tTH\tFR\tSA') # Print 上面那條

_month = { # 列舉一個月有幾天
# 月:幾天
1: 31,
2: [28, 29],
3: 31,
4: 30,
5: 31,
6: 30,
7: 31,
8: 31,
9: 30,
10: 31,
11: 30,
12: 31
}

# 列舉平年, 閏年天數
_year = [365, 366]


def isLeap(year): # 一個判斷是不是閏年的 Method
if year % 400 == 0: return True
if year % 100 == 0: return False
if year % 4 == 0: return True


# 這裡算出總共幾天,除以7的餘數就是月初所在的位置。
total_days = 0

for __year in range(1, year + 1): # 假設是2021年03月算年的部份應該算1-2021年。
total_days += _year[1] if isLeap(__year) else _year[0]

for __month in range(1, month): # 這裡算到02月底就可以,因為要顯示的是三月的開頭。
if __month == 2:
if isLeap(year): total_days += _month[2][1]
else: total_days += _month[2][0]
else:
total_days += _month[__month]

_start = total_days % 7 # 顯示的月開始要跳過幾個格子
_end = _month[month] if month != 2 else _month[2][1] if isLeap(
year) else _month[2][0] # 顯示的月有幾天

# 輸出結果
_str = str()
_day = 1
_count = 0
for _ in range(_start + _end):
if _ < _start: _str += '\t'
else:
_str += str(_day) + '\t'
_day += 1
_count += 1
if _count == 7:
print(_str)
_count = 0
_str = str()

print()
year, month = 2021,5

print('SU\tMO\tTU\tWE\tTH\tFR\tSA') # Print 上面那條

_month = { # 列舉一個月有幾天
# 月:幾天
1: 31,
2: [28, 29],
3: 31,
4: 30,
5: 31,
6: 30,
7: 31,
8: 31,
9: 30,
10: 31,
11: 30,
12: 31
}

# 列舉平年, 閏年天數
_year = [365, 366]


def isLeap(year): # 一個判斷是不是閏年的 Method
if year % 400 == 0: return True
if year % 100 == 0: return False
if year % 4 == 0: return True


# 這裡算出總共幾天,除以7的餘數就是月初所在的位置。
total_days = 0

for __year in range(1, year + 1): # 假設是2021年03月算年的部份應該算1-2021年。
total_days += _year[1] if isLeap(__year) else _year[0]

for __month in range(1, month): # 這裡算到02月底就可以,因為要顯示的是三月的開頭。
if __month == 2:
if isLeap(year): total_days += _month[2][1]
else: total_days += _month[2][0]
else:
total_days += _month[__month]

_start = total_days % 7 # 顯示的月開始要跳過幾個格子
_end = _month[month] if month != 2 else _month[2][1] if isLeap(
year) else _month[2][0] # 顯示的月有幾天

# 輸出結果
_str = str()
_day = 1
_count = 0
for _ in range(_start + _end):
if _ < _start: _str += '\t'
else:
_str += str(_day) + '\t'
_day += 1
_count += 1
if _count == 7:
print(_str)
_count = 0
_str = str()

print()
OWO
\tOUO
沒有 我在浪費生命放學店的垃圾
這排版...
Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
我不知道這個 Tab 在這裡這麼棒
fib = lambda n:reduce(lambda x,n:[x[1],x[0]+x[1]], range(n),[0,1])[0]
fib(87)
Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
Title:
Test

Description:
test

Example Input:
1+1

Example Output:
2
Title:
Longest repeated string length

Description:
Find the longest repeated repeated string length from given input
Input is a long string without space

Example Input:
12223

Example Output:
3