Created
February 20, 2017 07:13
-
-
Save s16003/da8fe32e76d5c48a3235d6c7c4176af7 to your computer and use it in GitHub Desktop.
恋するハッカソン
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
| [n,m] = [int(col) for col in input().split()] | |
| [print('OK') if (m % n == 0) else print('NG')] |
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
| [M, N] = [int(_) for _ in input().split()] | |
| [print(M - N) if(M - N > 0) else print(0)] |
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
| import math | |
| [n, p] = [int(_) for _ in input().split()] | |
| [m, q] = [int(_) for _ in input().split()] | |
| print((n * p) + q * math.ceil(n / m)) |
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
| [N, S] = [input() for _ in range(2)] | |
| print('\n'.join([S for _ in range(int(N))])) |
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
| [n, m] = [int(col) for col in input().split()] | |
| [print('OK') if (m < n) or (m == n) else print('NG')] |
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
| [s, t] = [int(input()) for _ in range(2)] | |
| mutable = list('-' * s) | |
| mutable[t - 1] = '+' | |
| print(''.join(mutable)) |
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
| p = int(input()) | |
| [print(p //100 + 10) if (p >= 1000) else print(p // 100)] |
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
| import sys; | |
| matrix = [l.strip().split() for l in sys.stdin.readlines() if l != '\n'] | |
| [print('NG') if [a == b for [a, b] in matrix].count(True) < 3 else print('OK')] |
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
| [print('lucky') if (int(input()) % 7 == 0) else print('unlucky')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment