Love丶FFC's Blog
当自然数 n 依次取 1、2、3、……、N 时,算式 ⌊n/2⌋+⌊n/3⌋+⌊n/5⌋ 有多少个不同的值?(注:⌊x⌋ 为取整函数,表示不超过 x的最大自然数,即 x 的整数部分。)
输入给出一个正整数 N(2≤N≤104)。
在一行中输出题面中算式取到的不同值的个数。
2017
1480
1.利用int进行取整
2.利用Python中set的性质进行去重
N = int(input()) Value = list() # 存放每个算式的值 for i in range(1, N + 1): Value.append(int(i / 2) + int(i / 3) + int(i / 5)) # 将算式的值添加到列表中 Value = set(Value) # 将列表转为集合,这样可以去除重复的值 print(len(Value)) # 集合的长度就是算式取到的不同值的个数
authentic cheap jordans
I just wanted to thank you for the fast service. and they look great. I received them a day earlier than expected. simillar to the I will definitely continue to buy from this site. regardless I will recommend this site to my friends. Thanks!
authentic cheap jordans https://www.realjordansretro.com/
cheap louis vuitton handbags
I just wanted to thank you for the fast service. or perhaps they look great. I received them a day earlier than expected. which include the I will definitely continue to buy from this site. in any event I will recommend this site to my friends. Thanks!
cheap louis vuitton handbags https://www.louisvuittonsoutletstore.com/
authentic louis vuitton outlet
I just wanted to thank you for the fast service. also known as they look great. I received them a day earlier than expected. choose the I will definitely continue to buy from this site. you ultimately choose I will recommend this site to my friends. Thanks!
authentic louis vuitton outlet https://www.cheapreallouisvuitton.com/
jordans for cheap
I just wanted to thank you for the fast service. as well as they look great. I received them a day earlier than expected. which includes I will definitely continue to buy from this site. situation I will recommend this site to my friends. Thanks!
jordans for cheap https://www.cheaprealjordan.com/
FoorryNox
Description Preliminary data from our lab and others demonstrates that CD53 expression is induced during early B cell development, and may play a role in protecting both normal and malignant B cells from apoptosis best price cialis
louis vuittons outlet
Read reviews and was a little hesitant since I had already inputted my order. or possibly a but thank god, I had no issues. much like the received item in a timely matter, they are in new condition. anyway so happy I made the purchase. Will be definitely be purchasing again.
louis vuittons outlet https://www.louisvuittonsoutletonline.com/
Preliaf
Among the 225 total patients enrolled in APOLLO, 126 56 fulfilled criteria to be included in the prespecified cardiac subpopulation cheap cialis from india