当前位置:网站首页>PTA (daily question) 7-75 how many people in a school
PTA (daily question) 7-75 how many people in a school
2022-07-29 00:23:00 【Little Deng programmer who can write bugs】
The number of teaching staff in a school is insufficient n people , Line up on the playground ,7 A row left 5 people ,5 A row left 3 people ,3 A row left 2 people ; How many possibilities are there for the number of students in this school ? There may be at most a few people ?
Input format :
There are multiple sets of test data , Processing to the end of the file . Enter an integer for each set of tests n(1≤n≤10000).
Output format :
For each group of tests , Output one line , contain 2 An integer separated by a space , It indicates the possible number and the maximum possible number of teaching staff of the school .
sample input :
1000
sample output :
9 908
Code :
try:
while True:
n = int(input())
lst = []
for i in range(n):
if i % 7 == 5 and i % 5 == 3 and i % 3 == 2:
lst.append(i)
print(len(lst), max(lst))
except EOFError:
pass

边栏推荐
- AutoCAD -- import excel tables into CAD and merge CAD
- Immutable x officially opens IMX token pledge detailed IMX pledge introduction optimistic about the development prospect of IMX
- CV semantic segmentation model sketch (2)
- How can Plato obtain premium income through elephant swap in a bear market?
- Alibaba Code代码索引技术实践:为Code Review提供本地IDE的阅读体验
- Attack and defense world web master advanced area php2
- Install mysql5.7 under Linux, super detailed complete tutorial, and cloud MySQL connection
- Plato farm is expected to further expand its ecosystem through elephant swap
- Sword finger offer 41. median in data flow
- Compilation principle research study topic 2 -- recursive descent syntax analysis design principle and Implementation
猜你喜欢

Using recursion and chain header interpolation to realize the group turnover of linked lists -- leetcode25 K group turnover linked lists

Eye of depth (18) -- partial derivative
![[microservice] Nacos cluster building and loading file configuration](/img/50/7af220c57a06eb186729c9882d9dab.png)
[microservice] Nacos cluster building and loading file configuration

curl (7) Failed connect to localhost8080; Connection refused

分布式限流 redission RRateLimiter 的使用及原理

vulnhub:SolidState

Plato farm is expected to further expand its ecosystem through elephant swap

110 MySQL interview questions and answers (continuously updated)

vulnhub:Sar

#{}和${}的区别
随机推荐
IDEA报错Error running ‘Application‘ Command line is too long解决方案
动态规划问题(六)
Dynamic programming problem (3)
Idea2021.2 installation and configuration (continuous update)
#{}和${}的区别
MySQL installation and configuration tutorial (super detailed, nanny level)
MySQL安装配置教程(超级详细、保姆级)
[microservice] Nacos cluster building and loading file configuration
MySql中的like和in走不走索引
AutoCAD -- import excel tables into CAD and merge CAD
Field injection is not recommended solution
Dynamic programming problem (6)
Real time data warehouse: meituan reviews Flink's real-time data warehouse application sharing
时间序列统计分析
[CNN] Why is the convolution kernel size of CNN usually odd
Advanced area of attack and defense world web masters -baby Web
Solution: direct local.Aar file dependencies are not supported when building an aar
面试被问到了String相关的几道题,你能答上来吗?
Detailed explanation of 9 common reasons for MySQL index failure
vulnhub:BTRSys2