Q. [GESP]L5-202509-Q3451-J
[GESP]L5-202509-Q3451-J
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
假设函数 gcd() 能正确求两个正整数的最大公约数,则下面的 findMusicalPattern(4, 6) 函数返回 2。
void findMusicalPattern(int rhythm1, int rhythm2) {
int commonDivisor = gcd(rhythm1, rhythm2);
int patternLength = (rhythm1 * rhythm2) / commonDivisor;
return patternLength;
}
{{ select(1) }}
- 正确
- 错误
GESP 2025.09 C++ 五级 全真模拟赛
- 状态
- 已结束
- 规则
- OI
- 题目
- 27
- 开始于
- 2026-11-20 13:32
- 结束于
- 2026-11-25 13:32
- 持续时间
- 2 小时
- 主持人
- 参赛人数
- 0