結果

問題 No.443 GCD of Permutation
ユーザー ieneko18ieneko18
提出日時 2016-11-11 23:49:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 8,892 KB
最終ジャッジ日時 2023-08-16 20:02:20
合計ジャッジ時間 1,882 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 17 ms
8,728 KB
testcase_02 AC 16 ms
8,716 KB
testcase_03 AC 17 ms
8,652 KB
testcase_04 AC 17 ms
8,636 KB
testcase_05 AC 16 ms
8,644 KB
testcase_06 WA -
testcase_07 AC 16 ms
8,584 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
8,764 KB
testcase_11 WA -
testcase_12 AC 16 ms
8,624 KB
testcase_13 AC 16 ms
8,716 KB
testcase_14 AC 19 ms
8,828 KB
testcase_15 WA -
testcase_16 AC 16 ms
8,572 KB
testcase_17 WA -
testcase_18 AC 19 ms
8,776 KB
testcase_19 AC 17 ms
8,612 KB
testcase_20 AC 18 ms
8,816 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 19 ms
8,760 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 19 ms
8,816 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 18 ms
8,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import reduce
s=[int(i) for i in input()]
n=reduce(lambda a,b:a+b,s)
if s.count(s[0])==len(s):
    print(str(s[0])*len(s))
elif n%36==0:
    print(36)
elif n%9==0:
    print(9)
elif n%3==0:
    print(3)
else:
    print(1)
0