Please Install our Kuizzer app ! ---- Doesn't Know how to install click here!

Codechef Assignment | Week 3

CODECHEF SOLUTION

Week 3 link: Chandigarh University – Assignment – Week 3 Coding Competition | CodeChef

1. Chef and Chefina: CFCFNA

link: Chef and Chefina | CodeChef

#include <iostream>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int a,b,c;
        cin>>a>>b;
        c=a+b;
        if(c < 3) {
           cout << 1 << endl; 
        }
        else if (c>=3 && c <= 10) {
            cout << 2 << endl;
        }
        
         else if (c>=11 && c <= 60) {
            cout << 3 << endl;
        }
        
         else if (c>60) 
            cout << 4 << endl;
        
    }
    return 0;
}

2. Challenge for Most Difficult Problem : CHMDFP032

link: CHMDFP032 – Submit | CodeChef

#include <iostream>
using namespace std;

int main() {
 
    int t;
    cin>>t;
    while(t--) {
        int p,q,r;
        cin >>p>>q>>r;
    if (p < q && p < r) {
        cout << "Draw" << endl;
    } else if (q < p && q < r)  {
       cout << "Bob" << endl;
    } else {
      cout << "Alice"<< endl;

     }
    }
 
      return 0;
}

* The material and content uploaded on this website are for general information and reference purposes only and don’t copy the answers of this website to any other domain without any permission or else copyright abuse will be in action.

Please do it by your own first!

DMCA.com Protection Status

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
KUIZZER Helping Educational website for Youngers

Welcome To Kuizzer!

KUIZZER - Helping Educational Website for YoungersYour Post is going to visible like this

Here, Your Promotional Details are going to visible for others whenever they visit the site !

AdBlock Detected

Looks like you are using an ad-blocking browser extension. We request you to whitelist our website on the ad-blocking extension and refresh your browser to view the content.

Check out our merchandise, available at kuizzer.in

X
0
Would love your thoughts, please comment.x
()
x