数列
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.
题目描述
小 z 在数学课本中学到了数列这个概念,w 老师给他出了这样一个题:已知一个数列 的前两项为 。并且,对于 ,。你需要求出序列中有多少个不同的数。如果有无限多个数,输出 -1
。小 z 是在是太笨了,于是他向你求助。
输入格式
一行两个正整数
输出格式
一行一个整数,无穷个就输出 -1
。
3 5
5
提示
对于 的数据
对于 的数据
端午欢乐赛
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2025-6-1 10:00
- End at
- 2025-6-2 10:00
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 33