1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

はじめに

前回
今日は麻雀で負けまくったので萎えています。
ABCのAを全部埋めます。

#21

[問題]
(https://atcoder.jp/contests/arc015/tasks/arc015_2)
2WA

考えたこと
思考停止で場合分けしました。未満と以下、以上をしっかり確認して実装しないと痛い目をみます()。

n = int(input())
temp = [list(map(float,input().split())) for _ in range(n)]
ans = [0] * 6
for i in temp:
    if i[0] >= 35: #猛暑日
        ans[0] += 1
    elif 30 <= i[0] < 35: #真夏日
        ans[1] += 1
    elif 25 <= i[0] < 30: #夏日
        ans[2] += 1
    if i[1] >= 25: #熱帯夜
        ans[3] += 1
    elif i[1] < 0 and i[0] >= 0: #冬日
        ans[4] += 1
    elif i[0] < 0: #真冬日
        ans[5] += 1

l = list(map(str,ans))
ans = ' '.join(l)
print(ans)

まとめ

楽しかった数理の翼も終わってしまいました。学校の宿題します。では、また

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?