Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace spoj
- {
- class Program
- {
- static void Main(string[] args)
- {
- int t = int.Parse(Console.ReadLine());
- for (int i = 0; i < t; i++)
- {
- int ile = int.Parse(Console.ReadLine());
- string tekst = Console.ReadLine();
- string[] tab = tekst.Split(' ');
- int wynik = 0;
- for (int j = 0; j < tab.Length; j++)
- {
- wynik += int.Parse(tab[j]);
- }
- Console.WriteLine(wynik);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement