-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 580_Problem_in_your_to_do_list.cpp
- Loading branch information
1 parent
4e6bcdc
commit 63791a3
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// https://www.codechef.com/problems/TODOLIST | ||
|
||
#include <bits/stdc++.h> | ||
|
||
using namespace std; | ||
|
||
int main() { | ||
// your code goes here | ||
int t; | ||
cin >> t; | ||
while (t--) | ||
{ | ||
int n; | ||
int count = 0; | ||
cin >> n; | ||
int arr[n]; | ||
for (int i = 0; i < n; i++) | ||
{ | ||
cin >> arr[i]; | ||
} | ||
for (int i = 0; i < n; i++) | ||
{ | ||
if (arr[i] >= 1000) | ||
{ | ||
count++; | ||
} | ||
} | ||
cout << count << endl; | ||
} | ||
return 0; | ||
|
||
} |