Well, that caught me out.
tl;dr; NCSHARP (C# NET 6.0) programs are compiled in debug mode, while CSHARP (C# gcms 5.20.1) are compiled in release mode.
If a problem requires a single test case per run, I often use conditional compile #if DEBUG statements to allow multiple test cases, with the expectation that SPOJ would compile the program in release mode and so these wouldn’t execute.
I’ve just spent an hour wondering why my program was SIGABRTing, and it turns out to be because it was compiled in debug mode under NCSHARP.
Something to watch out for.