結果

問題 No.443 GCD of Permutation
ユーザー finefine
提出日時 2017-02-05 18:14:53
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 117 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 11,272 KB
実行使用メモリ 37,112 KB
最終ジャッジ日時 2023-08-25 22:46:12
合計ジャッジ時間 4,809 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
19,476 KB
testcase_01 AC 79 ms
15,124 KB
testcase_02 AC 77 ms
15,272 KB
testcase_03 AC 77 ms
15,276 KB
testcase_04 AC 84 ms
15,200 KB
testcase_05 AC 72 ms
15,052 KB
testcase_06 AC 77 ms
15,128 KB
testcase_07 AC 80 ms
15,272 KB
testcase_08 AC 78 ms
15,132 KB
testcase_09 AC 77 ms
15,128 KB
testcase_10 AC 78 ms
15,152 KB
testcase_11 AC 79 ms
15,156 KB
testcase_12 AC 79 ms
15,132 KB
testcase_13 AC 75 ms
15,128 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
ans = s.to_i
a = s.split('')
10000.times{|i|
    a.shuffle!
    ans = ans.gcd(a.join.to_i)
    }
p ans
0