记录详情

Compile Error

foo.c:1:1: error: unknown type name 'def'
    1 | def calculate_shipping_cost(weight):
      | ^~~
foo.c: In function 'calculate_shipping_cost':
foo.c:1:36: error: expected declaration specifiers before ':' token
    1 | def calculate_shipping_cost(weight):
      |                                    ^
foo.c:2:30: error: stray '#' in program
    2 |     first_weight_price = 15  # 首重价格
      |                              ^
foo.c:3:35: error: stray '#' in program
    3 |     additional_weight_price = 10  # 续重价格
      |                                   ^
foo.c:4:31: error: stray '#' in program
    4 |     discount_threshold = 100  # 折扣阈值
      |                               ^
foo.c:5:26: error: stray '#' in program
    5 |     discount_rate = 0.9  # 折扣率
      |                          ^
foo.c:7:7: error: invalid preprocessing directive #\U00008ba1\U00007b97\U00005feb\U00009012\U00008d39\U00007528
    7 |     # 计算快递费用
      |       ^~~~~~~~~~~~
foo.c:13:7: error: invalid preprocessing directive #\U00005224\U000065ad\U0000662f\U00005426\U00008d85\U00008fc7\U00006298\U00006263\U00009608\U0000503c
   13 |     # 判断是否超过折扣阈值
      |       ^~~~~~~~~~~~~~~~~~~~
foo.c:19:3: error: invalid preprocessing directive #\U00008f93\U00005165\U00005305\U000088f9\U000091cd\U000091cf
   19 | # 输入包裹重量
      |   ^~~~~~~~~~~~
foo.c:22:3: error: invalid preprocessing directive #\U00008ba1\U00007b97\U00005feb\U00009012\U00008d39\U00007528\U00005e76\U00008f93\U000051fa
   22 | # 计算快递费用并输出
      |   ^~~~~~~~~~~~~~~~~~
foo.c:1:5: warning: type of 'weight' defaults to 'int' [-Wimplicit-int]
    1 | def calculate_shipping_cost(weight):
      |     ^~~~~~~~~~~~~~~~~~~~~~~
foo.c:26: warning: control reaches end of non-void function [-Wreturn-type]
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1038 快递费用
语言
C
递交时间
2023-12-21 13:46:42
评测时间
2023-12-21 13:46:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes