0

Code coach, days between dates, c#

I have problem with hidden test cases: https://code.sololearn.com/cL4V4WQHPIV1/?ref=app Code looks like working, similar code in python and Java works OK. Where is error?

1st Apr 2020, 8:41 AM
Igor Kostrikin
Igor Kostrikin - avatar
6 Answers
+ 2
The years of the hidden cases are not older than 1975. Do all hidden test cases fail? Does it matter if you write res.Days or res.TotalDays? Can this be a problem? -> CultureInfo.InvariantCulture Tbh, I have no idea why your code fails ;)
3rd Apr 2020, 2:45 AM
Denise Roßberg
Denise Roßberg - avatar
0
Only 2 of hidden test cases fail. Same result with res.Days and res.TotalDays.
3rd Apr 2020, 4:10 AM
Igor Kostrikin
Igor Kostrikin - avatar
0
try some CultureInfo variants -> same result
3rd Apr 2020, 4:14 AM
Igor Kostrikin
Igor Kostrikin - avatar
0
This code was successfully compiled with MonoDevelop. I tested it with many input data variants.
3rd Apr 2020, 4:36 AM
Igor Kostrikin
Igor Kostrikin - avatar
0
Igor Kostrikin Which 2 testcases? I can try to find them out.
3rd Apr 2020, 11:06 AM
Denise Roßberg
Denise Roßberg - avatar
0
Case #3 and #4
4th Apr 2020, 8:17 PM
Igor Kostrikin
Igor Kostrikin - avatar