CODEIT03 - Play with Dates

no tags 

Problem Statement:

Given the date, month and year, find the day.

Input Specification:

The first line consists of an integer t, the number of test cases. Then for each test case there are three integers the date, month and year.

Output Specification:

For each test case print the day in words in a separate line (The first character should be capitalised followed by lowercase).

Input Constraints:

1 <= t <= 100

Date/month/year >= 11/1/2012

Date/month/year <= 31/12/3000

The given date will always be a valid date

Sample Input:

3

11 1 2012

12 1 2012

13 1 2012

Sample Output:

Wednesday

Thursday

Friday


hide comments
PANKAJ SAINI: 2012-06-27 04:56:27

very silly mistake.. :P
spelling of thursday was wrong... X(

ultimately got AC :)

Last edit: 2012-06-27 04:57:01
daft_wullie: 2012-06-24 11:23:18

easy in languages with builtin-calender :-)

Aditya Pande: 2012-06-24 05:45:21

@cegprakash: i suggest u shift this problem to challenge for code golfing

PANKAJ SAINI: 2012-06-22 04:24:46

I am getting right answers as per calendar also, but here wrong answer

pls help..

jaans: 2012-06-19 11:53:36

:D finally AC :D silly n cute mistake caused so many wrong answers :(

Ajey Golsangi: 2012-05-09 16:54:05

Tricky one. Looks easy, but it's not. 1st March 3000 is a Saturday !!!

Rocker3011: 2012-04-19 20:53:32

Don't need of any special algorithm, nice problem, got WA like a boss hahaha and finally AC d:

strings: 2012-04-17 19:36:40

hey... i have checked every date in the given range... took at random and all be correct... pls check submission
id: 6863091

(Tjandra Satria Gunawan)(曾毅昆): 2012-04-10 17:50:42

Some test cases:
31 12 10000 = Sunday
1 1 1 = Monday

Better late than never !!!: 2012-04-05 15:01:23

Nice Problem..

Care must be taken for months of jan and feb in case of leap years !!!! :)


Added by:cegprakash
Date:2012-01-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All