Last active
July 17, 2018 14:48
-
-
Save uni745e/4bfa94d786226a387be9b3b296d3dfe5 to your computer and use it in GitHub Desktop.
AtCoder abc093
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
S = input() | |
ABC = 'abc' | |
ans = 'No' | |
for i in range(3): | |
if(ABC[i] not in S): break | |
else: ans = 'Yes' | |
print(ans) |
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
A,B,K = map(int, input().split()) | |
sub = B - A + 1 | |
if K*2 >= sub: | |
for i in range(A, B+1): | |
print(i) | |
else: | |
for i in range(A, A+K): | |
print(i) | |
for i in range(B-K+1, B+1): | |
print(i) |
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
A,B,C = map(int, input().split()) | |
M = [A,B,C] | |
M.sort() | |
cnt = 0 | |
sub1 = M[2]-M[1] | |
cnt += sub1 | |
sub2 = M[2]-M[0]-sub1 | |
if (sub2)%2 == 0: | |
cnt += sub2//2 | |
else: | |
cnt += 1+(sub2+1)//2 | |
print(cnt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment