結果
問題 |
No.1472 作為の和
|
ユーザー |
![]() |
提出日時 | 2021-04-10 00:55:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-25 13:37:12 |
合計ジャッジ時間 | 1,334 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 9 |
ソースコード
import sys input = sys.stdin.readline from math import pi N=int(input()) if N<=2: MAX=int(pi*(10**N)) SS=-1 ind=1 for i in range(MAX+1): for j in range(MAX+1): S1=0 for s in str(i): S1+=int(s) S2=0 for s in str(j): S2+=int(s) if SS==S1*S2: ind+=1 elif SS<S1*S2: SS=S1*S2 ind=1 print(SS,ind) else: print((2+9*N)**2,1)