/in/foo.c:1:1: error: unknown type name 'def'
def calculate_total_seconds(H, M, S):
^~~
/in/foo.c: In function 'calculate_total_seconds':
/in/foo.c:1:37: error: expected declaration specifiers before ':' token
def calculate_total_seconds(H, M, S):
^
/in/foo.c:2:7: error: invalid preprocessing directive #�
# 计算总秒数
^
/in/foo.c:6:3: error: invalid preprocessing directive #�
# 接收用户输入
^
/in/foo.c:11:3: error: invalid preprocessing directive #�
# 计算并打印结果
^
/in/foo.c:1:5: warning: type of 'H' defaults to 'int' [-Wimplicit-int]
def calculate_total_seconds(H, M, S):
^~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:1:5: warning: type of 'M' defaults to 'int' [-Wimplicit-int]
/in/foo.c:1:5: warning: type of 'S' defaults to 'int' [-Wimplicit-int]
/in/foo.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]
print(f"总秒数为: {int(total_seconds)}")
^~~~~