Can You Bench
Source: codechef
Difficulty: 170

Can You Bench
Chef goes to the gym daily and follow a progressive bench press routine. In the$1^{st}$set, Chef will lift$X$kilograms. For each subsequent set, you increase the weight by$10$kilograms.
Your task is to calculate the amount of weight Chef will bench in the$3^{rd}$set.
Input Format
The input consists of a single integer$X$, the weight (in kilograms) Chef benches in the$1^{st}$set.
Output Format
Output a single integer — the weight (in kilograms) Chef will bench in the$3^{rd}$set.
Constraints$1 \leq X \leq 100$Sample 1:
Explanation:
In the$1^{st}$set Chef benches 10 kg, in the next it becomes 20 kg and in the$3^{rd}$it becomes 30 kg
Sample 2:
Input
Output
20
40
Explanation:
In the$1^{st}$set Chef benches 20 kg, in the next it becomes 30 kg and in the$3^{rd}$it becomes 40 kg

Sample Input:
10

Sample Output:
30

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

int main() {
    int t;
    cin>>t;
    int k= t+20;
    cout<<k<<endl;
    

}

Go solution:
package main
import "fmt"

func main(){
    // your code goes here
    var num uint
    fmt.Scan(&num)
    fmt.Println(num+20)
    
    
}

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

class Codechef
{
    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        System.out.println(t+10+10);

    }
}

JavaScript solution:
let stdInput = "";

process.stdin.on("data", (input) => {
    stdInput += input;
});

process.stdin.on("end", () => {
    const X = parseInt(stdInput.trim()); 
    console.log(X + 20); 
});

Python solution:
# cook your dish here
x = int(input())
print(x+20)

Ruby solution:
# Read and validate input
begin
  input = gets
  x = input.to_i
  raise "Invalid input" if x < 1 || x > 100
rescue
  x = 0  # Fallback for invalid input
end

# Calculate 3rd set weight (1st set + 20kg)
result = x + 20

# Debug output (uncomment if needed)
# puts "Input: #{x}, Calculating: #{x} + 20 = #{result}"

# Final output
puts result