問題
https://atcoder.jp/contests/abc258/tasks/abc258_a

方針
ゼロ埋めzero paddingが必要になる。
解答
#input
k = int(input())
#output
h = 21 + k//60
m = k-(h-21)*60
print("{0}:".format(h)+"{:02}".format(m))提出結果
https://atcoder.jp/contests/abc258/submissions/32973275
補足
桁合わせについて。次の例文がわかり易い。
person = "denovo"
height = 180
weight = 65.2334
ID = 123
print("{0}さんは身長は{1:.1f}cm、体重は{2:.2f}kgで、IDは{3:08}です。".format(person, height, weight, ID))わかりやすいリンクはこちら。
https://note.nkmk.me/python-format-zero-hex/
感想
特になし。


コメント