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
f = open("Problem_013.txt", 'r', encoding = 'UTF-8') | |
lines = f.readlines() | |
f.close | |
lines_int = list(map(int, lines)) | |
print(sum(lines_int)) |
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
num = 10 | |
judge = False | |
try: | |
while True: | |
base = input().split(',') | |
except EOFError: | |
pass | |
base_01 = int(base[0]) |
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
str = input() |
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
int = int(input()) |
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
print(a,b) #変数a, bを空白区切りで出力 |
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 = map(int, input().split()) # "A B"と空白区切りで数値が入力されるのを受け取る |
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
# Solution No.1 | |
s=int(input()) | |
print(s//3600,s//60%60,s%60,sep=':') | |
# Solution No.2 | |
import math | |
sec = int(input()) | |
print("{}:{}:{}".format(math.floor(sec / 3600), math.floor(sec % 3600 / 60), (sec % 3600 % 60))) | |
# Solution No.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
# Solution No.1 | |
a,b = input().split(' ') | |
if int(a) > int(b): | |
print('a > b') | |
elif int(a) < int(b): | |
print('a < b') | |
else: | |
print('a == b') | |
# Solution No.2 |
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
# Solution No.1 | |
while True: | |
n,m = map(int, input().split()) | |
if n == 0 and m == 0: | |
break | |
cnt = 0 | |
for i in range(1, n+1): | |
for j in range(i+1, n+1): | |
for k in range(j+1, n+1): |
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
# Solution No.1 | |
while True: | |
s = input() | |
if s == '-': break | |
n = int(input()) | |
for i in range(n): | |
h = int(input()) | |
s = s[h:] + s[:h] | |
print(s) |
OlderNewer