KIDZEE1L - Progression

no tags 

Given three numbers, find out if they form an arithmetic progression, geometric progression, both, or none.

তিনটি সংখ্যা দেওয়া থাকবে, তোমাকে বলতে হবে তারা কি সমান্তর ধারা, গুণোত্তর ধারা, উভয়টি হতে পারে, নাকি কোনটিই নয়।

Input

First line contains the number of test cases T (T ≤ 50). Then T lines follow, each containing three integers n1, n2, n3 where 1 ≤ n1, n2, n3 ≤ 1000.

প্রথম লাইনের টেস্ট কেসের সংখ্যা দেওয়া T (T ≤ 50)দেওয়া থাকবে, এর পরে T টি লাইন থাকবে। প্রত্যেক লাইনে তিনটি করে সংখ্যা n1, n2, n3দেওয়া থাকবে যেখানে 1 ≤ n1, n2, n3 ≤ 1000.

Output

For each test case, print a line of the following format: “Case X: ” where X is the case number starting from 1, and must be replaced with one of the following four strings: “None”, “Arithmetic Progression”, “Geometric Progression”, “Both”, without quotes obviously, depending on your result. Check sample input output section for more details.

প্রতিটি টেস্ট কেসের জন্য তোমাকে এক লাইন করে প্রিন্ট করতে হবে, ফরম্যাট হবেঃ “Case X: ”যেখানে X হল কেস নম্বর (১ থেকে শুরু করে) এবং অংশটি তোমাকে তোমার উত্তর অনুযায়ী পরবর্তী চারটি স্ট্রিং এর কোন একটি প্রিন্ট করতে হবেঃ “None”, “Arithmetic Progression”, “Geometric Progression”, “Both”(অবশ্যই কোটেশন ছাড়া)।স্যাম্পল ইনপুট আউটপুট সেকশনে আউটপুট কেমন হতে হবে তা দেখানো আছে।

Example

Input:
4
1 2 5
1 3 5
2 4 8
2 2 2

Output:
Case 1: None
Case 2: Arithmetic Progression
Case 3: Geometric Progression
Case 4: Both

hide comments
nadstratosfer: 2018-06-17 04:35:07

Same as KIDZEE1P except for language restriction.

 .::.: 2014-05-18 15:38:47

getting wa
<snip>

Last edit: 2023-02-26 17:49:01

Added by:Shafaet
Date:2013-01-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C C++ 4.3.2 CPP JAVA
Resource:Own problem - Used for Junior Training