結果

問題 No.443 GCD of Permutation
ユーザー wotsushiwotsushi
提出日時 2017-03-31 19:16:51
言語 Ruby
(3.2.2)
結果
WA  
実行時間 -
コード長 107 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 11,452 KB
実行使用メモリ 47,572 KB
最終ジャッジ日時 2023-09-21 10:44:49
合計ジャッジ時間 7,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,240 KB
testcase_01 AC 76 ms
15,304 KB
testcase_02 AC 76 ms
15,312 KB
testcase_03 AC 75 ms
15,252 KB
testcase_04 AC 74 ms
15,344 KB
testcase_05 AC 75 ms
15,348 KB
testcase_06 AC 78 ms
15,024 KB
testcase_07 AC 75 ms
15,128 KB
testcase_08 AC 76 ms
15,020 KB
testcase_09 AC 75 ms
15,124 KB
testcase_10 AC 77 ms
15,088 KB
testcase_11 AC 76 ms
15,168 KB
testcase_12 AC 76 ms
15,264 KB
testcase_13 AC 76 ms
15,084 KB
testcase_14 AC 492 ms
39,804 KB
testcase_15 AC 207 ms
30,704 KB
testcase_16 AC 127 ms
21,392 KB
testcase_17 AC 148 ms
24,208 KB
testcase_18 AC 446 ms
42,568 KB
testcase_19 AC 150 ms
24,360 KB
testcase_20 AC 414 ms
39,404 KB
testcase_21 AC 207 ms
30,500 KB
testcase_22 AC 78 ms
15,692 KB
testcase_23 AC 76 ms
15,472 KB
testcase_24 AC 76 ms
15,388 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 258 ms
31,812 KB
testcase_28 AC 449 ms
44,712 KB
testcase_29 AC 490 ms
47,516 KB
testcase_30 AC 484 ms
47,572 KB
testcase_31 AC 497 ms
47,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
M = N.to_s.chars
ans = (1..500).inject(N) {|memo, _| memo.gcd(M.shuffle.join.to_i)}
puts ans
0