This file contains 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
# ------------------------------------- | |
# yukicoder | |
# No.462 6日知らずのコンピュータ | |
# http://yukicoder.me/problems/no/462 | |
# ------------------------------------- | |
# power(n) の計算結果を(最大128保存) | |
from functools import lru_cache | |
@lru_cache(maxsize=None) | |
def power(n): |
This file contains 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
# ------------------------------------ | |
# yukicoder | |
# No.463 魔法使いのすごろく | |
# http://yukicoder.me/problems/no/463 | |
# 一次線形連立方程式 / 動的計画法 | |
# ------------------------------------ | |
# なんか答えが合わない | |
This file contains 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
# ------------------------------------ | |
# yukicoder | |
# No.453 製薬会社 | |
# http://yukicoder.me/problems/no/453 | |
# 線形計画法(単体法) | |
# ------------------------------------ | |
c, d = map(int, input().split()) | |
can_tuple = list() | |
if 4*d < 4*c/3: |
This file contains 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
# ------------------------------------ | |
# yukicoder | |
# No.459 C-VS for yukicoder | |
# http://yukicoder.me/problems/no/459 | |
# 貪欲法 | |
# ------------------------------------ | |
# データ入力 | |
h, w, n = map(int, input().split()) |
This file contains 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
from sys import stdin, argv | |
__doc__ = """ | |
Usage: | |
T | |
join [-h | --help] | |
Options: | |
-h --help Show this screen and exit. |
This file contains 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
from sys import argv, stdin | |
from collections import defaultdict | |
__doc__ = """ | |
Usage: | |
column [-l] [-a] number or splice | |
column [-h | --help] | |
Options: | |
-l Show column number. |
This file contains 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
from sys import argv | |
from DictionaryServices import DCSCopyTextDefinition | |
__doc__ = """ | |
Usage: | |
line [-h | --help] | |
Options: | |
-h --help Show this screen and exit. |
This file contains 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
from sys import stdin, argv | |
__doc__ = """ | |
Usage: | |
join str | |
join [-h | --help] | |
Options: | |
-h --help Show this screen and exit. |
This file contains 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
from sys import argv, stdin | |
__doc__ = """ | |
Usage: | |
line [-l] number or splice | |
line [-h | --help] | |
Options: | |
-l Show line number. | |
-h --help Show this screen and exit. |
This file contains 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
from sys import argv, stdin | |
__doc__ = """ | |
Usage: | |
max [-f] [-i] | |
max [-h | --help] | |
Options: | |
-f Don't show error message. | |
-i Convert result to int. |