Conquer the Fest!!
Source: codechef
Difficulty: 153

Conquer the Fest!!
IIIT Pune
is celebrating its annual fest with a lineup of exciting events. And among the technical events
InfInITy
stands out as a prestigious coding contest, known for its challenging coding problems.
This year, the contest includes a difficult problem.
The problem has a
difficulty level
of$B$, and a participant needs an IQ of
at least$10\times B$to solve it.
You have an IQ of$N$. Can you take on the challenge and solve this tough problem, or is it too hard to crack?
Input Format
The first and only line of input will contain two space-separated integers$N$and$B$— your IQ, and the difficulty level of the problem you are trying to solve.
Output Format
Output on a single line the answer:
"YES"
(without quotes) if you can solve the problem, and
"NO"
(without quotes) otherwise.
Each character of the output may be printed in either uppercase or lowercase, i.e. if the answer is
No
, then all of
NO
,
No
,
nO
, and
no
will be accepted.
Constraints$1 \leq N \leq 500$$1 \leq B \leq 100$Sample 1:
Explanation:
The problem requires$12 \times 10 = 120$IQ, which you have exactly, so you can solve it.
Sample 2:
Input
Output
40 5
NO
Explanation:
The problem requires$5 \times 10 = 50$IQ, but you only have$40$, which is insufficient.

Sample Input:
120 12

Sample Output:
YES

C++ solution:
#include <bits/stdc++.h>
using namespace std;

int main() {
    // your code goes here
    int n,b;
    cin>>n>>b;
    if(10*b<=n){
        cout<<"yes";
    }else{
        cout<<"no";
    }
}

Go solution:
package main
import "fmt"

func main(){
    // your code goes here
    
    var n, b int
    fmt.Scan(&n, &b);
    if (n >= 10*b){
        fmt.Println("YES");
    }else{
        fmt.Println("NO")
    }
}

Java solution:
import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s=new Scanner(System.in);
        int x=s.nextInt();
        int y=s.nextInt();
        int t=y*10;
        if(x>=t){
            System.out.println("yes");
        }
        else{
            System.out.println("no");
        }

    }
}

JavaScript solution:
function solve(){
    const readline = require("readline").createInterface({
        input: process.stdin,
        output: process.stdout,
        terminal: false,
    });
    
    let lines = [];
    
    readline.on("line", (line) => {
        lines.push(line);
    })
    
    readline.on("close", () => {
        processTestCases(lines);
    })
}

function processTestCases(lines){
    let [a, b] = lines[0].split(" ").map(Number);
    if(a >= 10*b){
        console.log("YES");
    }
    else{
        console.log("NO");
    }
}

solve();

Python solution:
# cook your dish here
a,b = map(int,input().split())
if a>=b*10 :
    print("YES")
else :
    print("NO")

Ruby solution:
# Read input safely and handle all edge cases
begin
  input = gets
  if input.nil? || input.strip.empty?
    puts "NO"
    exit
  end

  n, b = input.strip.split.map(&:to_i)

  if n >= b * 10
    puts "YES"
  else
    puts "NO"
  end
rescue
  puts "NO"
end