两倍
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给定2到15个不同的正整数,你的任务是计算这些数里面有多少个数对满足:数对中一个数是另一个数的两倍
比如给定1 4 3 2 9 7 18 22,得到的答案是3,因为2是1的两倍,4是2个两倍,18是9的两倍。
输入格式
一行,给出2到15个两两不同且小于100的正整数。最后用0表示输入结束。
输出格式
一个整数,即有多少个数对满足其中一个数是另一个数的两倍。
样例 #1
1 4 3 2 9 7 18 22 0
3
A班第三天测试
- Status
- Done
- Rule
- Ledo
- Problem
- 9
- Start at
- 2025-7-23 19:00
- End at
- 2025-7-23 21:00
- Duration
- 2 hour(s)
- Host
- Partic.
- 10