結果
問題 |
No.375 立方体のN等分 (1)
|
ユーザー |
![]() |
提出日時 | 2016-06-05 12:28:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 17,696 KB |
最終ジャッジ日時 | 2024-10-08 15:29:11 |
合計ジャッジ時間 | 7,747 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 3 TLE * 1 -- * 24 |
ソースコード
def f(n): l = [] c = 2 while c <= n: if n % c == 0: n //= c l += [c] else: c += 1 return l N = int(input()) p = f(N) if len(p) > 2: for i in range(len(p)-3): p = sorted(p) p = [p[0]*p[1]]+p[2:] print(sum(p)-len(p), N-1)