ARGTS – Editorial

PROBLEM LINK:

Practice
Contest

Author: Arkapravo Ghosh
Tester: Arkapravo Ghosh
Editorialist: Arkapravo Ghosh

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Array

PROBLEM:

You are given an element K. There are T test cases. For every test case, you are given N integers. You have to check if the sum of the N integers is greater than K or not.

EXPLANATION:

For every test case, you need to find the sum of the given N numbers. If the sum of the numbers is greater than K, then output FAILURE else output SUCCESS.
The time complexity of the solution is O(n).

AUTHOR’S AND EDITORIALIST’S SOLUTIONS:

Author’s and editorialist’s solution can be found here.