結果
問題 | No.1109 調の判定 |
ユーザー |
![]() |
提出日時 | 2020-07-14 05:09:12 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 523 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-11-15 20:05:25 |
合計ジャッジ時間 | 5,945 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
コンパイルメッセージ
Syntax OK
ソースコード
require "set" N = gets.to_i T = gets.split.map(&:to_i) cands = (0..11).filter { |x| Set.new(T).subset? Set.new([x, x + 2, x + 4, x + 5, x + 7, x + 9, x + 11].map{_1 % 12}) } puts cands.empty? || cands.size > 1 ? -1 : cands[0]