-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #678 from chetan104522/cabs_start
new_problems
- Loading branch information
Showing
6 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
for input in (1..number) do | ||
fre = gets.chomp.to_i | ||
if fre.between?(67, 45000) | ||
puts "YES" | ||
else | ||
puts "NO" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
number = gets.chomp.to_i | ||
if 1<= number && number <= 30 | ||
for i in 1..number do | ||
if 1<= number && number <= 30 | ||
lasts_min = gets.chomp.to_i | ||
submissions = lasts_min * 2 | ||
puts "#{submissions}" | ||
else | ||
puts "number out of range" | ||
end | ||
end | ||
else | ||
puts "out of range" | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# cook your code here | ||
number = gets.chomp.to_i | ||
if 1<=number && number<=1000 | ||
for i in 1..number do | ||
page = gets.chomp.to_i | ||
if 1<=page && number<=1000 | ||
if page%25 == 0 | ||
puts "#{page/25}" | ||
else | ||
puts "#{page/25+1}" | ||
end | ||
else | ||
puts "page is out of range" | ||
end | ||
end | ||
else | ||
puts "out of range" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# cook your code here | ||
number = gets.chomp.to_i | ||
if number.between?(1,10) | ||
for i in (1..number) do | ||
x,y = gets.split.map(&:to_i) | ||
if x.between?(50,200) && y.between?(50,200) | ||
result = x-y | ||
puts "#{result}" | ||
else | ||
puts "range should be between 50 to 200" | ||
end | ||
end | ||
else | ||
puts "out of range" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# cook your code here | ||
number = gets.chomp.to_i | ||
if 1<= number && number <=10000 | ||
for i in 1..number do | ||
x,y,z = gets.split.map(&:to_i) | ||
if 1<= x && 1<=y && 1<=z && x<= 100 && y<=100 && z<=100 && x!=y && x!=z && y!=x && y!=z && z!= x && z!=y | ||
|
||
if x > y && x > z | ||
puts "Setter" | ||
elsif y > x && y > z | ||
puts "Tester" | ||
else | ||
puts "Editorialist" | ||
end | ||
else | ||
puts "puts the inputs between 1 to 100" | ||
end | ||
end | ||
else | ||
puts "number is out of range" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
number = gets.chomp.to_i | ||
if number.between?(1,1000) | ||
for i in (1..number) do | ||
x,y = gets.split.map(&:to_i) | ||
if x.between?(100,200) && y.between?(100,200) | ||
if x < y | ||
puts "B" | ||
else | ||
puts "A" | ||
end | ||
else | ||
puts "age should be between 1 to 100" | ||
end | ||
end | ||
else | ||
puts "out of range" | ||
end |