Q
Since the probability of precipitation (%) for 7 days is entered separated by line breaks, please output the total number of days to go out.
13 0 15 31 89 100 30 If given 4 Please create a program that outputs.
The input is given in the following format.
t_1 t_2 t_3 t_4 t_5 t_6 t_7
Since the probability of precipitation for 7 days is entered separated by line breaks, please output the total number of days to go out.
python
t_1 = gets.chomp.to_i
t_2 = gets.chomp.to_i
t_3 = gets.chomp.to_i
t_4 = gets.chomp.to_i
t_5 = gets.chomp.to_i
t_6 = gets.chomp.to_i
t_7 = gets.chomp.to_i
int = t_1, t_2, t_3, t_4, t_5, t_6, t_7
str = int.select do |i|
i <= 30
end
print str.size
Recommended Posts