Quick actions

cmd+k|ctrl+k

Navigation

Languages

백준 2525번 - C

Snippet info

Language

C

Visibility

public

Author

legacy-v1-13979

Created

2023-08-17T23:56:08.284684Z

Updated

2023-08-17T23:56:08.284684Z

#include <stdio.h>

int main(void) {
    int iHour, iMin, iNeedMin;
    int itotalHour, itotalMin;
    
    scanf("%d %d", &iHour, &iMin);
    scanf("%d", &iNeedMin);
    
    itotalHour = iHour + ((iMin + iNeedMin)/60);
    if (itotalHour >= 24) itotalHour -= 24;
    
    itotalMin = (iMin + iNeedMin) % 60;
    
    printf("%d %d",itotalHour, itotalMin);
    
    return 0;
}
INFO