0
1

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.

AtCoder Beginner Contest 085 A,B,C

Posted at

ここではAtCoder Beginner Contest 085の過去問の復習を兼ねて記述する

考え方として
同じ直径の餅を使うことはできないので重複するものを除いて考える
そのために集合型の要素数を取得するsetを利用する

//nを数字で指定
//dは直径のため繰り返し処理を行うためfor文を用いる
n=int(input())
d=[int(input()) for i in range(n)]
//集合型の要素数を取得
print(len(set(d)))

0
1
0

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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?