結果

問題 No.443 GCD of Permutation
ユーザー finefine
提出日時 2017-02-05 18:15:06
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 115 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 11,364 KB
実行使用メモリ 21,436 KB
最終ジャッジ日時 2023-08-25 22:46:23
合計ジャッジ時間 6,953 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,084 KB
testcase_01 AC 82 ms
15,136 KB
testcase_02 AC 79 ms
15,016 KB
testcase_03 AC 81 ms
15,252 KB
testcase_04 AC 80 ms
15,320 KB
testcase_05 AC 81 ms
15,056 KB
testcase_06 AC 79 ms
15,260 KB
testcase_07 AC 81 ms
15,048 KB
testcase_08 AC 81 ms
15,280 KB
testcase_09 AC 81 ms
15,304 KB
testcase_10 AC 82 ms
15,152 KB
testcase_11 AC 81 ms
15,080 KB
testcase_12 AC 79 ms
15,156 KB
testcase_13 AC 80 ms
15,084 KB
testcase_14 AC 326 ms
21,436 KB
testcase_15 AC 154 ms
17,228 KB
testcase_16 AC 110 ms
16,056 KB
testcase_17 AC 122 ms
16,608 KB
testcase_18 AC 288 ms
20,576 KB
testcase_19 AC 122 ms
16,572 KB
testcase_20 AC 270 ms
20,320 KB
testcase_21 AC 154 ms
17,196 KB
testcase_22 AC 82 ms
15,380 KB
testcase_23 AC 80 ms
15,252 KB
testcase_24 AC 80 ms
15,084 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 183 ms
17,752 KB
testcase_28 WA -
testcase_29 AC 310 ms
19,592 KB
testcase_30 AC 314 ms
19,372 KB
testcase_31 AC 318 ms
19,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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