记录详情

Accepted

foo.c: In function 'main':
foo.c:16:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   16 |  scanf("%d%d",&a1,&a2);
      |  ^~~~~~~~~~~~~~~~~~~~~
foo.c:17:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   17 |  scanf("%d%d",&a3,&a4);
      |  ^~~~~~~~~~~~~~~~~~~~~
foo.c: In function 'p':
foo.c:7:9: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
    7 |  return n;
      |         ^
foo.c: In function 'p2':
foo.c:11:3: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |  m=a1*a2/p(a1,a2);
      |  ~^~~~~~~~~~~~~~~
foo.c: In function 'main':
foo.c:20:2: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |  printf("%d %d",i/p(i,j),j/p(i,j));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:11:3: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |  m=a1*a2/p(a1,a2);
      |  ~^~~~~~~~~~~~~~~
foo.c:3:9: note: 'n' was declared here
    3 | { int m,n;
      |         ^
foo.c:11:3: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |  m=a1*a2/p(a1,a2);
      |  ~^~~~~~~~~~~~~~~
foo.c:3:9: note: 'n' was declared here
    3 | { int m,n;
      |         ^
foo.c:20:2: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |  printf("%d %d",i/p(i,j),j/p(i,j));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:11:3: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |  m=a1*a2/p(a1,a2);
      |  ~^~~~~~~~~~~~~~~
foo.c:3:9: note: 'n' was declared here
    3 | { int m,n;
      |         ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 1ms 292.0 KiB
#4 Accepted 1ms 384.0 KiB
#5 Accepted 1ms 256.0 KiB

信息

递交者
类型
递交
题目
A6-2 最大公约数专题:分数的加法
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-03-06 20:24:12
评测时间
2022-03-06 20:24:12
评测机
分数
100
总耗时
6ms
峰值内存
384.0 KiB