Type: RemoteJudge 1000ms 128MiB

[GESP样题 一级] 当天的第几秒

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

小明刚刚学习了小时、分和秒的换算关系。他想知道一个给定的时刻是这一天的第几秒,你能编写一个程序帮帮他吗?

输入格式

输入一行,包含三个整数和一个字符。三个整数分别表示时刻的时、分、秒;字符有两种取值,大写字母'A'表示上午,大写字母'P'表示下午。

输出格式

输出一行,包含一个整数,表示输入时刻是当天的第几秒。

0 0 0 A
0
11 59 59 P
86399

GESP一级

Not Claimed
Status
Done
Problem
22
Open Since
2025-8-12 0:00
Deadline
2025-9-30 23:59
Extension
24 hour(s)