HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


007. 50401 - Sum of Odd Numbers

Guest
• Review clarifications (1)

Volume problems

• 50882 - FizzBuzz
• 50308 - IT Knowledge Seminars
• 50320 - Random Sorted List
• 001. 50385 - From m to n
• 002. 50365 - Sum of the numbers f...
• 002. 50452 - Multiplication Table
• 003. 50387 - Passengers in the Train
• 006. 50293 - Sum of odd numbers f...
• 007. 50401 - Sum of Odd Numbers
• 009. 50783 - The smallest number
• 010. 50782 - Max of N integers
• 015. 50466 - Drawing Square From...
• 016. 50463 - Drawing a Triangle
• 017. 50423 - Numbers square
• 018. 50344 - Profit or Loss
• 019. 50438 - Pattern with stars
• 020. 50408 - Molecules

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Sum of Odd Numbers

Question:
You will be given n numbers. Calculate the sum of odd numbers.

Input specification
You will be first, given an integer (n). Then, the next line will contain n integers where 1 ≤ n ≤ 20000 and each number is between -30000 and 30000.

Output specification
Show just one integer number: the sum of odd numbers.

Sample Input I   
  10
  1 -2 3 4 5 8 -7 8 10 9   
Sample Output I   
  11


Для отправки решений необходимо выполнить вход.

www.contester.ru