週末副業記

土日は副業エンジニアのブログです。副業に関することを投稿します。

2018-06-29から1日間の記事一覧

sorted()の出力を降順にする(AtCoder(競プロ)1日1問【28日目】)

AtCoder Beginner Contest 088 B問題 競技プログラミングで使える関数を実際の問題を通して紹介いたします。 今回は「sorted()」です。 sorted()の出力を降順にする N=input() a= sorted([int(j) for j in input().split()],reverse=True) print(sum(a[:…

条件によりprint文の出力を変更する(AtCoder(競プロ)1日1問【27日目】【Python】)

AtCoder Beginner Contest 088 A問題 競技プログラミングで使える関数を実際の問題を通して紹介いたします。 今回は「print()」です。 条件によりprint文の出力を変更する n=int(input())a=int(input())print(['No','Yes'][n-(n//500)/(1/500)-a<=0]) 理屈…