Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
272047 Nguyễn Đăng Vũ Nguyên DÃY CON MA THUẬT C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 542 2023-11-21 10:19:59

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:32:22: warning: format ‘%lld’ expects argument of type ‘long long int*’, but argument 2 has type ‘int*’ [-Wformat=]
   scanf("%lld", &a[i]);
                 ~~~~~^
Main.cc:35:13: error: cannot convert ‘int*’ to ‘long long int*’ for argument ‘1’ to ‘void sosanh(long long int*, long long int)’
  sosanh(a, n);
             ^
Main.cc:25:11: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
      scanf("%lld", &n);
      ~~~~~^~~~~~~~~~~~
Main.cc:32:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld", &a[i]);
   ~~~~~^~~~~~~~~~~~~~~