結果

問題 No.1644 Eight Digits
ユーザー 小野寺健小野寺健
提出日時 2021-11-13 16:49:33
言語 Ruby
(3.3.0)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 145 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 15,628 KB
最終ジャッジ日時 2023-08-18 10:00:50
合計ジャッジ時間 5,375 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
15,368 KB
testcase_01 AC 121 ms
15,552 KB
testcase_02 AC 121 ms
15,344 KB
testcase_03 AC 122 ms
15,424 KB
testcase_04 AC 122 ms
15,392 KB
testcase_05 AC 118 ms
15,416 KB
testcase_06 AC 119 ms
15,244 KB
testcase_07 AC 120 ms
15,364 KB
testcase_08 AC 118 ms
15,376 KB
testcase_09 AC 117 ms
15,208 KB
testcase_10 AC 118 ms
15,412 KB
testcase_11 AC 119 ms
15,580 KB
testcase_12 AC 120 ms
15,416 KB
testcase_13 AC 119 ms
15,540 KB
testcase_14 AC 120 ms
15,448 KB
testcase_15 AC 120 ms
15,588 KB
testcase_16 AC 119 ms
15,452 KB
testcase_17 AC 121 ms
15,560 KB
testcase_18 AC 119 ms
15,420 KB
testcase_19 AC 121 ms
15,412 KB
testcase_20 AC 119 ms
15,416 KB
testcase_21 AC 122 ms
15,348 KB
testcase_22 AC 122 ms
15,628 KB
testcase_23 AC 122 ms
15,408 KB
testcase_24 AC 123 ms
15,564 KB
testcase_25 AC 121 ms
15,372 KB
testcase_26 AC 120 ms
15,340 KB
testcase_27 AC 120 ms
15,488 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

K = gets.to_i

a = ["1","2","3","4","5","6","7","8"]

cnt = 0
a.permutation(8).each {|p|
	x = p.join("").to_i
	cnt += 1 if x % K == 0
}

puts cnt
0