G.W. Coding Contest 3 P3: Cid's Playlist

Cid loves listening to classical music. He has \(N\) playlists for each of his favourite composers, each lasting \(H\) hours, \(M\) minutes, and \(S\) seconds.

One of Cid's friends, Alexia, asks how long each of his playlists are in seconds. Can you help Cid find these times?


Input Specification:

The first line of input will contain an integer \(N\), representing the number of playlists Cid has.

The next \(N\) lines will contain three integers, \(H\),\(M\) and \(S\).


Output Specification:

The output will consist of \(N\) integers, representing the length of Cid's \(i\)th playlist in seconds.


TIME CONSTRAINT: 1s

Sample Input 1:

3
1 2 3
15 59 23
0 0 0

Sample Output 1:

3723
57563
0

Submit Solution

Problem author: Enric