记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:11: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'long long int *' [-Wformat=]
  scanf("%ld",&a);
         ~~^  ~~
         %lld
foo.c:7:11: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'long long int *' [-Wformat=]
  scanf("%ld",&b);
         ~~^  ~~
         %lld
foo.c:8:11: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'long long int *' [-Wformat=]
  scanf("%ld",&c);
         ~~^  ~~
         %lld
foo.c:9:11: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'long long int *' [-Wformat=]
  scanf("%ld",&d);
         ~~^  ~~
         %lld
foo.c:10:17: error: invalid operands to binary % (have 'double' and 'long long int')
  answer=(10e9+7)%(a*d-b*c);
         ~~~~~~~~^~~~~~~~~~
foo.c:11:12: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=]
  printf("%ld",answer);
          ~~^
          %lld
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%ld",&a);
  ^~~~~~~~~~~~~~~
foo.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%ld",&b);
  ^~~~~~~~~~~~~~~
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%ld",&c);
  ^~~~~~~~~~~~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%ld",&d);
  ^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1289 B. It's my own Invention
比赛
南京师范大学2021年11月程序设计竞赛
语言
C
递交时间
2021-11-21 13:50:25
评测时间
2021-11-21 13:50:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes