UVa 10783

From Algorithmist
Jump to navigation Jump to search

10783 - Odd Sum[edit]

Summary[edit]

Find the sum of all the odd numbers between a and b.

Explanation[edit]

  • The constraints are small enough for you to brute force.

Optimizations[edit]

  • You could use math to figure this out but its really not neccessary for the given constraints.

Implementations[edit]

Input[edit]

2
1
5
3
5

Output[edit]

Case 1: 9
Case 2: 8

References[edit]