結果

問題 No.241 出席番号(1)
ユーザー sugim48sugim48
提出日時 2015-07-10 22:32:37
言語 Ruby
(3.2.2)
結果
AC  
実行時間 758 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 11,556 KB
実行使用メモリ 20,664 KB
最終ジャッジ日時 2023-08-20 17:42:23
合計ジャッジ時間 4,893 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
15,264 KB
testcase_01 AC 65 ms
14,996 KB
testcase_02 AC 65 ms
15,212 KB
testcase_03 AC 65 ms
15,144 KB
testcase_04 AC 64 ms
15,204 KB
testcase_05 AC 65 ms
15,200 KB
testcase_06 AC 65 ms
15,000 KB
testcase_07 AC 65 ms
15,228 KB
testcase_08 AC 66 ms
15,168 KB
testcase_09 AC 64 ms
15,236 KB
testcase_10 AC 65 ms
15,276 KB
testcase_11 AC 182 ms
15,824 KB
testcase_12 AC 66 ms
15,216 KB
testcase_13 AC 65 ms
15,108 KB
testcase_14 AC 65 ms
14,992 KB
testcase_15 AC 66 ms
15,100 KB
testcase_16 AC 141 ms
15,316 KB
testcase_17 AC 66 ms
15,068 KB
testcase_18 AC 65 ms
15,072 KB
testcase_19 AC 66 ms
15,264 KB
testcase_20 AC 65 ms
15,216 KB
testcase_21 AC 65 ms
15,068 KB
testcase_22 AC 65 ms
15,124 KB
testcase_23 AC 65 ms
15,212 KB
testcase_24 AC 67 ms
15,328 KB
testcase_25 AC 68 ms
15,260 KB
testcase_26 AC 65 ms
15,192 KB
testcase_27 AC 758 ms
20,664 KB
testcase_28 AC 69 ms
15,204 KB
testcase_29 AC 69 ms
15,320 KB
testcase_30 AC 68 ms
15,208 KB
testcase_31 AC 67 ms
15,100 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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
}
100000.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