Time conversion,
Time Conversion
Subject content:
When UTC is the world coordination, BJT is Beijing Time, and UTC time is equivalent to BJT minus 8. Now, your program needs to read an integer, indicating the time and minute of BJT. Digits and digits of an integer represent minutes, And digits of a hundred or thousands represent hours. If the hour is less than 10, there will be no thousands of parts; if the hour is 0, there will be no hundreds of parts; if the hour is not 0 but the score is less than 10, you need to keep the ten-digit 0; if the hour is 0 and the minute is less than 10, you do not need to keep the ten-digit 0. For example, 1124 indicates 09:05, 905 indicates 00:36, 36 indicates 00:07, and 7 indicates.
Valid input ranges from 0 to 2359. That is, your program cannot read input data from the test server other than 0 to 2359.
Your program needs to output the UTC time corresponding to this time. The output format is the same as that of the input, that is, an integer is output, indicating the time and minute of UTC. Digits and digits of an integer represent minutes, And digits of a hundred or thousands represent hours. If the hour is less than 10, there will be no thousands of parts; if the hour is 0, there will be no hundreds of parts; if the hour is not 0 but the score is less than 10, you need to keep the ten-digit 0; if the hour is 0 and the minute is less than 10, you do not need to keep the ten-digit 0.
Reminder: You must be careful with cross-day conversion.
Input Format:
An integer that represents the hour and minute of BJT. Digits and digits of an integer represent minutes, And digits of a hundred or thousands represent hours. If the hour is less than 10, there will be no thousands of parts; if the hour is 0, there will be no hundreds of parts; if the hour is not 0 but the score is less than 10, you need to keep the ten-digit 0; if the hour is 0 and the minute is less than 10, you do not need to keep the ten-digit 0.
Output Format:
An integer that represents the hour and minute of UTC. Digits and digits of an integer represent minutes, And digits of a hundred or thousands represent hours. If the hour is less than 10, there will be no thousands of parts; if the hour is 0, there will be no hundreds of parts; if the hour is not 0 but the score is less than 10, you need to keep the ten-digit 0; if the hour is 0 and the minute is less than 10, you do not need to keep the ten-digit 0.
# Include <stdio. h>
Int main ()
{
Int h, m, input, B;
Scanf ("% d", & input );
H = input/100;
M = input % 100;
If (h> = 8 ){
Printf ("% d", B = (h-8) * 100 + m );
} Else {
Printf ("% d", B = (h + 24-8) * 100 + m );
}
Return 0;
}