結果
問題 | No.414 衝動 |
ユーザー | mesame3993 |
提出日時 | 2021-11-16 15:10:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 544 bytes |
コンパイル時間 | 139 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 57,856 KB |
最終ジャッジ日時 | 2024-05-09 20:47:42 |
合計ジャッジ時間 | 1,888 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 56 ms
57,472 KB |
testcase_01 | AC | 39 ms
52,224 KB |
testcase_02 | AC | 33 ms
52,352 KB |
testcase_03 | WA | - |
testcase_04 | AC | 49 ms
57,472 KB |
testcase_05 | AC | 47 ms
57,472 KB |
testcase_06 | AC | 51 ms
57,472 KB |
testcase_07 | AC | 37 ms
51,712 KB |
testcase_08 | AC | 42 ms
57,216 KB |
testcase_09 | WA | - |
testcase_10 | AC | 36 ms
52,224 KB |
testcase_11 | AC | 38 ms
57,472 KB |
testcase_12 | AC | 37 ms
57,088 KB |
ソースコード
def main(): from sys import stdin input=stdin.readline m = int(input()) def factorization(n): # soinsuubunkai, cnt, kosuu arr, tmp = [], n for i in range(2, int(-(-n**0.5//1))+1): if tmp % i == 0: cnt = 0 while tmp % i == 0: cnt += 1 tmp //= i arr.append([i, cnt]) if tmp != 1: arr.append([tmp, 1]) if len(arr) == 0: arr.append([n, 1]) return arr f = factorization(m) if len(f) == 1: print(*f[0]) else: print(f[0][0], m//f[0][0]) main()