From 9997eb6fae11ca927df90c9712ce335b5a3f0cd0 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Sun, 29 May 2022 00:05:50 +0200 Subject: Added a new directory codechef which contains some problem I solved on codechef.com --- codechef/problemCategory.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 codechef/problemCategory.cpp (limited to 'codechef/problemCategory.cpp') diff --git a/codechef/problemCategory.cpp b/codechef/problemCategory.cpp new file mode 100644 index 0000000..4eb7500 --- /dev/null +++ b/codechef/problemCategory.cpp @@ -0,0 +1,23 @@ +#include + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int x; + cin >> x; + if(x < 100) { + cout << "Easy" << '\n'; + } + else if(x >= 100 && x < 200) { + cout << "Medium" << '\n'; + } + else if(x >= 200 && x <= 300) { + cout << "Hard" << '\n'; + } + } +} -- cgit v1.2.3