HackerEarth's basic programming solutions( Teddy and Tweety, Hello, Aman & Mr.Sharma ) :

Problem 24: Teddy and Tweety

Solution: (in c++)


( please guys before moving to the solution try it yourself at least 3-4 times , if you really wanna become a good coder)

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
if(n%3==0)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}

This code is simple. There's no need for any explanation.





Problem 25: Hello

Solution: (in c++)


( please guys before moving to the solution try it yourself at least 3-4 times , if you really wanna become a good coder)

#include<iostream>
using namespace std;
int main()
{
    cout<<"Hello Kirti"<<endl;
}

This code is simple. There's no need for any explanation.





Problem 26: Aman & Mr.Sharma

Solution: (in c++)


( please guys before moving to the solution try it yourself at least 3-4 times , if you really wanna become a good coder)

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long x,r, t,count=0,i;
    cin>>t;
    while(t--)
    {
        cin>>r>>x;
        if((100*x)>=(2*22*r/7))
        {
            count++;
        }
    }
    cout<<count<<endl;
}

This code is simple. There's no need for any explanation.
 

 

 

Guys , if you have any queries related to a question or need more explanation, comment down below!

 

Comments

Popular posts from this blog

Coursera's Algorithmic toolbox assignment solutions( Sum of Two Digits, Maximum Pairwise Product ) :

HackerEarth's basic programming solutions( Seating Arrangement, Zoos, Anagrams ) :

HackerEarth's basic programming solutions( Minimize Cost, Magical Word, Best Index ) :