2020工大杯题解-B
个人题解,和比赛官方无关,仅供参考
2020 工大杯题解- B - Classmate L ’s PE course.
题目描述
Classmate L forgot to elect his course, so he had to take a strange PE course. On this strange course, students will play a weird game: each male student represent
Classmate L is bad at math, he wants to know how many people he will be gathering together with.
Lots of students forgot to elect courses too, so we can assume that there is an infinite number of male and female students.
输入数据
One line containing three non-zero positive integer
Meaning of
For the next
输出数据
For each query, output the number of male students and the number of
female students separated by a space.
If it’s not possible form ARE YOU KIDDING ME?
.
If there are multiple answers, output the answer as the greatest
number of male students.
样例输入
1 | 2 2 3 |
样例输出
1 | ARE YOU KIDDING ME? |
题目大意
每个男生代表
相当于是求以下方程中
思路
读入
进行时间复杂度分析:
伪代码
1 | 读入a,b,n |
代码
1 | #include <iostream> |