Skip to content

Instantly share code, notes, and snippets.

@asuka-mirai
asuka-mirai / Problem_013.py
Last active May 27, 2016 12:45
Project Euler Problem 013
f = open("Problem_013.txt", 'r', encoding = 'UTF-8')
lines = f.readlines()
f.close
lines_int = list(map(int, lines))
print(sum(lines_int))
num = 10
judge = False
try:
while True:
base = input().split(',')
except EOFError:
pass
base_01 = int(base[0])
print(a,b) #変数a, bを空白区切りで出力
a,b = map(int, input().split()) # "A B"と空白区切りで数値が入力されるのを受け取る
# 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
# 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
# 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):
# 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)