結果

問題 No.2350 Four Seasons
ユーザー osyo-mangaosyo-manga
提出日時 2023-06-23 13:06:45
言語 Ruby
(3.3.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 15,288 KB
最終ジャッジ日時 2023-09-13 07:59:38
合計ジャッジ時間 2,172 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,172 KB
testcase_01 AC 83 ms
15,072 KB
testcase_02 AC 83 ms
15,152 KB
testcase_03 AC 82 ms
15,124 KB
testcase_04 AC 84 ms
15,288 KB
testcase_05 AC 83 ms
15,152 KB
testcase_06 AC 83 ms
15,080 KB
testcase_07 AC 84 ms
15,168 KB
testcase_08 AC 83 ms
15,116 KB
testcase_09 AC 81 ms
15,256 KB
testcase_10 AC 81 ms
15,244 KB
testcase_11 AC 82 ms
15,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# 入力された値を文字列で受け取る
str = gets.chomp

month = str.to_i

if [3, 4, 5].include? month
  puts "spring"
elsif [6, 7, 8].include? month
  puts "summer"
elsif [9, 10, 11].include? month
  puts "fall"
elsif [12, 1, 2].include? month
  puts "winter"
end
0