結果

問題 No.241 出席番号(1)
ユーザー sugim48sugim48
提出日時 2015-07-10 22:31:52
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 216 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 11,176 KB
実行使用メモリ 25,004 KB
最終ジャッジ日時 2023-09-22 09:58:56
合計ジャッジ時間 9,871 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
22,300 KB
testcase_01 AC 78 ms
15,340 KB
testcase_02 AC 79 ms
15,032 KB
testcase_03 AC 78 ms
15,316 KB
testcase_04 AC 78 ms
15,144 KB
testcase_05 AC 80 ms
15,136 KB
testcase_06 AC 78 ms
15,292 KB
testcase_07 AC 77 ms
15,120 KB
testcase_08 AC 77 ms
15,168 KB
testcase_09 AC 78 ms
15,080 KB
testcase_10 AC 78 ms
15,104 KB
testcase_11 AC 1,512 ms
15,760 KB
testcase_12 AC 78 ms
15,300 KB
testcase_13 AC 79 ms
15,176 KB
testcase_14 AC 78 ms
15,136 KB
testcase_15 AC 78 ms
15,140 KB
testcase_16 AC 966 ms
15,140 KB
testcase_17 AC 78 ms
15,248 KB
testcase_18 AC 79 ms
15,140 KB
testcase_19 AC 78 ms
15,200 KB
testcase_20 AC 78 ms
15,296 KB
testcase_21 AC 78 ms
15,076 KB
testcase_22 AC 78 ms
15,168 KB
testcase_23 AC 77 ms
15,108 KB
testcase_24 AC 78 ms
15,208 KB
testcase_25 AC 79 ms
15,200 KB
testcase_26 AC 78 ms
14,996 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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