/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:15: warning: format '%d' expects a matching 'int *' argument [-Wformat=]
    7 |     scanf("%d%d",&i);
      |              ~^
      |               |
      |               int *
foo.c:8:5: warning: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
    8 |     print("%d\n",log(i-0.1,3)+1);
      |     ^~~~~
      |     lrint
foo.c:8:18: error: too many arguments to function 'log'
    8 |     print("%d\n",log(i-0.1,3)+1);
      |                  ^~~
In file included from /nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/features.h:491,
                 from /nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/bits/libc-header-start.h:33,
                 from /nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:27,
                 from foo.c:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/bits/mathcalls.h:104:1: note: declared here
  104 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      | ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1361 天平称量
语言
C
递交时间
2023-09-26 20:51:25
评测时间
2023-09-26 20:51:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes