-->
当前位置:首页 > 题库

PROGRAMMING:Analyze the voting situation of the event

Luz5年前 (2021-05-10)题库387
Using set analysis to analyze the voting situation. There are five members in the first team, whose serial numbers are 1, 2, 3, 4 and 5; The second team also has five players, number 6, 7, 8, 9, 10. Enter a string of votes, the second team did not vote for the team
###Input format:
Enter the serial number of the winning team member in one line, separated by commas.
###Output format:
Output the number of the second team member who did not win the vote in the line.
###Input example:
Here is a set of inputs. For example:
```in
1,5,9,3,9,1,1,7,5,7,7,3,3,1,5,7,4,4,5,4,9,5,10,9
```
###Output example:
The corresponding output is given here. For example:
```out
6 8
```







answer:If there is no answer, please comment
```
s2={1,2,3,4,5}
s3={6,7,8,9,10}
s1=set(input().split(','))
s1={int(x) for x in s1}
#S1-S2 the second team member who won the vote
lst=list(s3-(s1-s2))
lst.sort()
print(*lst)
```