結果
問題 |
No.548 国士無双
|
ユーザー |
|
提出日時 | 2017-07-29 23:30:49 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 52 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-07-05 20:26:31 |
合計ジャッジ時間 | 2,507 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 RE * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
def ascan; gets.split.map(&:to_i); end def scan; gets.to_i; end a = gets.chomp f = false "a".upto("m"){|c| b = (a+c).chars h = {} b.each{|e| h[e]||=0; h[e]+=1} j = {} h.values.each{|e| j[e]||=0; j[e]+=1} if j[1] == 12 && j[2] == 1 && h.to_a.include?{|k,v| "abcdefghijklm".include?(k) && v == 2} puts c f = true end } unless f puts "Impossible" end