File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # https://www.hackerrank.com/challenges/simple-array-sum/problem
2+
3+ #!/bin/python3
4+
5+ import os
6+ import sys
7+
8+ #
9+ # Complete the simpleArraySum function below.
10+ #
11+ def simpleArraySum (ar ):
12+ sum = 0
13+ for ar_i in ar :
14+ sum += ar_i
15+ return sum
16+
17+ if __name__ == '__main__' :
18+ fptr = open (os .environ ['OUTPUT_PATH' ], 'w' )
19+
20+ ar_count = int (input ())
21+
22+ ar = list (map (int , input ().rstrip ().split ()))
23+
24+ result = simpleArraySum (ar )
25+
26+ fptr .write (str (result ) + '\n ' )
27+
28+ fptr .close ()
Original file line number Diff line number Diff line change 1+ # https://www.hackerrank.com/challenges/solve-me-first/problem
2+
3+ def solveMeFirst (a , b ):
4+ return a + b
5+
6+
7+ num1 = int (input ())
8+ num2 = int (input ())
9+ res = solveMeFirst (num1 , num2 )
10+ print (res )
11+
You can’t perform that action at this time.
0 commit comments