记录详情

Compile Error

/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)}")
 ^~~~~

信息

递交者
类型
递交
题目
小时分钟秒2
语言
C
递交时间
2024-06-18 00:43:08
评测时间
2024-06-18 00:43:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes