結果

問題 No.443 GCD of Permutation
ユーザー wotsushiwotsushi
提出日時 2017-03-31 19:16:14
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 107 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 25,500 KB
最終ジャッジ日時 2023-09-21 10:44:40
合計ジャッジ時間 4,974 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,344 KB
testcase_01 AC 76 ms
15,128 KB
testcase_02 AC 76 ms
15,132 KB
testcase_03 AC 76 ms
15,264 KB
testcase_04 AC 77 ms
15,040 KB
testcase_05 AC 79 ms
15,300 KB
testcase_06 AC 76 ms
15,264 KB
testcase_07 AC 77 ms
15,136 KB
testcase_08 AC 80 ms
15,172 KB
testcase_09 AC 77 ms
15,128 KB
testcase_10 AC 76 ms
15,248 KB
testcase_11 AC 77 ms
15,036 KB
testcase_12 AC 78 ms
15,300 KB
testcase_13 AC 78 ms
15,164 KB
testcase_14 AC 168 ms
25,500 KB
testcase_15 AC 103 ms
18,468 KB
testcase_16 AC 87 ms
16,668 KB
testcase_17 AC 92 ms
17,248 KB
testcase_18 AC 154 ms
24,320 KB
testcase_19 AC 92 ms
17,348 KB
testcase_20 AC 147 ms
23,636 KB
testcase_21 AC 104 ms
18,596 KB
testcase_22 AC 77 ms
15,520 KB
testcase_23 AC 76 ms
15,344 KB
testcase_24 AC 77 ms
15,316 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 116 ms
19,848 KB
testcase_28 WA -
testcase_29 AC 164 ms
25,244 KB
testcase_30 AC 164 ms
25,448 KB
testcase_31 AC 165 ms
25,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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