fork download
  1. public class NumArray {
  2. List<int> pre = new List<int>();
  3. public NumArray(int[] nums) {
  4. pre.Add(0);
  5. for (int i = 0; i < nums.Length; i++)
  6. {
  7. pre.Add(pre[i] + nums[i]);
  8. }
  9. }
  10.  
  11. public int SumRange(int left, int right) {
  12. right++;
  13. return pre[right] - pre[left];
  14. }
  15. }
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.100

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Package source with Name: nuget.org disabled successfully.
Package source with Name: local added successfully.
CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/home/4LFPKR/Project/Project.csproj]



CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/home/4LFPKR/Project/Project.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:03.94
stdout
Standard output is empty