Questions tagged [ulong]
63 questions
-1
votes
1 answer
Code optimization when searching for ulong prime numbers c#
I am doing the Product of consecutive Fib numbers challenge on codewars (https://www.codewars.com/kata/product-of-consecutive-fib-numbers/train/csharp) and when i have figured out how to do it i am prompted with the message that my code takes too…
![](../../users/profiles/7095078.webp)
Zache Alexandru
- 13
- 5
-1
votes
1 answer
c# decimal, ulong, calculating quantities
I have this code for my problem.I am almost there by for some of the tests I get slightly different results. As you will see,variable c should be "decimal". However when multiplying it by variable "n".
This is the problem:
Your task is to write a…
![](../../users/profiles/3376064.webp)
user3376064
- 39
- 1
- 1
- 6
-2
votes
1 answer
Substraction of two ulong giving wrong output
DateTime epochStart = new DateTime(1970, 01, 01, 0, 0, 0, 0, DateTimeKind.Utc);
TimeSpan currentTs = DateTime.UtcNow - epochStart;
ulong serverTotalSeconds = Convert.ToUInt64(currentTs.TotalSeconds);
ulong requestTotalSeconds =…
![](../../users/profiles/970349.webp)
Matt
- 1,823
- 1
- 19
- 37