Java Date and Day
Basic Accuracy: 36.95% Submissions: 859 Points: 1

Java Calendar class is an abstract class that provides methods for converting date between a specific instant in time and a set of calendar fields such as MONTH, YEAR, HOUR, etc.

Given a date(dd mm yyyy) in form of string. Print the day at the given date.

For example, if the given date is MARCH 17th 2017 print the output as FRIDAY.

Image result for calendar 2017 march

Input: First line of input contains a single integer T which denotes the number of test cases. T test cases follows, first and the only line of each test case contains a string S(date). 

Output: Corresponding to each test case, print the required output.

Constraints:

1<=T<=100
2000<year<3000


Example:

Input:
2
17 03 2017
29 11 2021

Output:
FRIDAY
MONDAY

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.