Posts

Apples and Oranges | Problem - 14 | Beginner level | C language | CodeChef

Link to the problem statement:  https://www.codechef.com/submit-v2/APPLORNG Solution:   #include <stdio.h> int main(void) { int x, a, b, t; scanf("%d %d %d", &x, &a, &b); t = a + b; if( x >= t ) printf("YES"); else printf("NO"); return 0; } Hope this will help you, if you want anything else leave a comment. Thank you

Water Requirement | Problem - 13 | Beginner level | C language | CodeChef

Link to the problem statement:   https://www.codechef.com/submit-v2/WATERREQ Solution:   #include <stdio.h> int main(void) { int t, n, i; scanf("%d", &t); for(i=0;i<t;i++) {     scanf("%d", &n);     n = n*2;     printf("%d\n",n); } return 0; } Hope this will help you, if you want anything else leave a comment. Thank you

Lunchtime | Problem - 12 | Beginner level | C language | CodeChef

Link to the problem statement:   https://www.codechef.com/submit-v2/LTIME Solution:   #include <stdio.h> int main(void) { int t, x, i; scanf("%d", &t); /* for(i=0;i<t;i++) {     scanf("%d", &x);     if(x>=1 && x<=4)     {         printf("YES\n");     }     else     {         printf("NO\n");     } }*/ while(t--) {   scanf("%d", &x);     if(x>=1 && x<=4)     {         printf("YES\n");     }     else     {         printf("NO\n");     }    } return 0; } Hope this will help you, if you want anything else leave a comment. Thank you

Chef and Chapters | Problem - 11 | Beginner level | C language | CodeChef

Link to the problem statement:   https://www.codechef.com/submit-v2/SEMCOURSES Solution:  #include <stdio.h> int main(void) { int t, i, x, y, z, s; scanf("%d", &t); for(i=0;i<t;i++) {     scanf("%d %d %d", &x, &y, &z);     s = x*y*z;     printf("%d\n", s); } return 0; } Hope this will help you, if you want anything else leave a comment. Thank you

Get Subscription | Problem - 10 | Beginner level | C language | CodeChef

Link to the problem statement: https://www.codechef.com/submit-v2/SUBSCRIBE Solution:  #include <stdio.h> int main(void) { int t, x, i; scanf("%d", &t); for(i=0;i<t;i++) {     scanf("%d", &x);     if(x>30)     printf("YES\n");     else     printf("NO\n"); } return 0; } You can watch the video solution of this problem: Hope this will help you, if you want anything else leave a comment. Thank you

Second Max of Three Numbers | Problem - 9 | Beginner level | C language | CodeChef

Link to the problem statement: https://www.codechef.com/submit-v2/MINHEIGHT Solution: #include <stdio.h> int main(void) { int t, a, b, c, i; scanf("%d", &t); for(i=0;i<t;i++) {     scanf("%d %d %d", &a, &b, &c);     if ( a !=b && a != c && b != c )     {         if( a > b && a > c )         {             if( b > c )             printf("%d\n",b);             else             printf("%d\n",c);         }         else if( b > a && b > c )         {             if( a > c )             printf("%d\n",a);             else       ...

Roller Coaster | Problem - 8 | Beginner level | C language | CodeChef

Link to the problem statement:  https://www.codechef.com/submit-v2/MINHEIGHT Solution:   #include <stdio.h> int main(void) {     int t, x, h, i; scanf("%d", &t); for(i=0;i<t;i++) {     scanf("%d %d", &x, &h);     if(x>=h)     {         printf("YES\n");     }     else     {         printf("NO\n");     } } return 0; } You can watch the video solution of this problem: Hope this will help you, if you want anything else leave a comment. Thank you

Who is taller! | Problem - 7 | Beginner level | C language | CodeChef

Link to the problem statement: https://www.codechef.com/submit-v2/TALLER Solution:   #include <stdio.h> int main(void) { int t, x, y, i; scanf("%d",&t); for(i=0;i<t;i++) {     scanf("%d %d", &x, &y);     if(x>y)     {         printf("A\n");     }     else     {         printf("B\n");     } } return 0; } You can watch the video solution of this problem: Hope this will help you, if you want anything else leave a comment. Thank you

How many unattempted problems | Problem - 6 | Beginner level | C language | CodeChef

Link to the problem statement:   https://www.codechef.com/submit-v2/PRACLIST Solution:  #include <stdio.h> int main(void) {     int x, y, z;     scanf("%d %d", &x , &y);     z = x - y;     printf("%d", z); return 0; } You can watch the video solution of this problem: Hope this will help you, if you want anything else leave a comment. Thank you

Add Two Numbers | Problem - 5 | Beginner level | C language | CodeChef

Link to the problem statement: https://www.codechef.com/submit-v2/FLOW001 Solution:  You just need to scroll down, then find the 'submit code' button and click on it. You can watch the video solution of this problem: Hope this will help you, if you want anything else leave a comment. Thank you