結果

問題 No.241 出席番号(1)
ユーザー sugim48
提出日時 2015-07-10 22:31:52
言語 Ruby
(3.4.1)
結果
TLE  
実行時間 -
コード長 216 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 21,792 KB
最終ジャッジ日時 2024-07-08 02:00:45
合計ジャッジ時間 9,618 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 TLE * 1 -- * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:19: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

n = gets.to_i
a = []
n.times { |i|
	a[i] = gets.to_i
}
1000000.times {
	b = (0...n).to_a.shuffle
	ok = true
	n.times { |i|
		ok = false if b[i] == a[i]
	}
	if ok
		n.times { |i|
			puts b[i]
		}
		exit
	end
}
puts -1
0