코딩 및 기타

오일러 1100,1131,1132

정지홍 2022. 12. 30. 12:15

#1100 과자 : 오일러OJ (euleroj.io)

def cal(a,b,c):
    re=a*b
    re=re-c
    if re>0:
        return re
    else:
        return int(0)


x,y,z=map(int,input().split())
rst=cal(x,y,z)
print(rst)

#1131 디지털 시계 : 오일러OJ (euleroj.io)

 

#include <iostream>
using namespace std;
int main(void) {
    int a, b, c;
    cin >> a >> b;
    cin >> c;
    b = b + c;
    int cntPlusHour=0;
    while (>=60) {
        b -= 60;
        cntPlusHour++;
    }
    a = a+cntPlusHour;
    while (>= 24) {
        a = a - 24;
    }
    cout << a << " " << b;
    return 0;
}

#1132 햄버거 : 오일러OJ (euleroj.io)

 

a=input()
b=a.split()
b=list(map(int,b))

pay=b[0]*b[1]

if pay-b[2]>0:
    print(pay-b[2])
else:
    print("0")