n=int(input())
y=n//360
if(n%360==0):
    print(str(y)+",0,0")
else:
    m=(n%360)//30
    if((n%360)%30==0):
        print(str(y)+","+str(m)+",0")
    else:
        d=(n%360)%30    #or d=n-(y*360+30*m)
        print(str(y)+","+str(m)+","+str(d))

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: