Last Defence时间限制:1000 ms | 内存限制:65535 KB描述Given two integers A and B. Sequence S is defined as follow:• S0 = A• S1 = B• Si = |Si-1 – Si-2| for i ≥ 2Count the number of distinct numbers in S .输入The first line of the input gives the number of test case…