Page Contents

**Sasta Shark Tank Codechef Solution**

Devendra just had a million-dollar idea and he needs funds to startup. He was recently invited to Sasta Shark Tank (A TV show where entrepreneurs pitch their ideas to investors hoping to get investment in return).

He was offered deals from two investors. The first investor offers A dollars for 10% of his company and the second investor offers B dollars for 20% of his company. Devendra will accept the offer from the investor whose valuation of the company is more. Determine which offer will Devendra accept or if both the offers are equally good.

For example, if the first investor offers 300 dollars for 10% of the company, then the first investor’s valuation of the company is 3000 dollars since 10% of 3000=300. If the second investor offers 500 dollars for 20% of the company, then the second investor’s valuation of the company is 2500 dollars since 20% of 2500=500.

Input Format

The first line contains a single integer T – the number of test cases. Then the test cases follow.

The first and only line of each test case contains two integers A and B – the amount offered by first investor for 10% of Devendra’s company and the amount offered by second investor for 20% of Devendra’s company respectively.

Output Format

For each test case, Output FIRST if Devendra should accept the first investor’s deal, output SECOND if he should accept the second investor’s deal, otherwise output ANY if both deals are equally good.

You may print each character of the strings in uppercase or lowercase (for example, the strings “FiRst”, “First”, “FIRST”, and “FIrst” will all be treated as identical).

Constraints

1≤T≤100

100≤A,B≤10000

A and B are multiples of 100

Sample Input 1

3

100 200

200 100

200 500

Sample Output 1

ANY

FIRST

SECOND

Explanation

Test case 1: First investor’s valuation of Devendra’s company was 1000 since 10% of 1000=100 which is the amount he offered for 10% of the company.

Second investor’s valuation of Devendra’s company was also 1000 since 20% of 1000=200 which is the amount he offered for 20% of the company.

Therefore he can accept any of the deal.

Test case 2: First investor offered a better deal as he valued Devendra’s company at 2000 dollars (since 10% of 2000=200) compared to the second investor who valued Devendra’s company at 500 dollars (since 20% of 500=100).

Test case 3: Second investor offered a better deal as he valued Devendra’s company at 2500 dollars compared to the first investor who valued Devendra’s company 2000 dollars.

**SOLUTION**

**Program: **Sasta Shark Tank Codechef Solution in Python

for _ in range(int(input())): a, b = map(int, input().split()) a*= 10 b*= 5 if (a > b): print("First") elif (a < b): print("Second") else: print("Any")

**Related:**

**Sasta Shark Tank Codechef Solution****Six Friends Codechef Solution****Best Coupon CHEAPFOOD Codechef Solution****Geometric Mean Inequality Codechef Solution****Pseudo Sorted Array Codechef Solution**

**April Long Challenge 2022 Solution**

*Dazzling AXNODR Challenge AXNODR Codechef Solution**Dazzling GCD Pair NOTUNIT Solution**The Cooler Dilemma 2 WATERCOOLER2 Solution**The Cooler Dilemma 1 WATERCOOLER1 Solution**Ezio and Guards MANIPULATE Codechef Solution**Pairwise Xors XORABC Codechef Solution**Prime Sum PRIMESM Codechef Solution*