結果
問題 | No.1472 作為の和 |
ユーザー | titia |
提出日時 | 2021-04-10 00:59:57 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 107 ms / 2,000 ms |
コード長 | 471 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 10,624 KB |
実行使用メモリ | 8,028 KB |
最終ジャッジ日時 | 2023-09-07 19:56:14 |
合計ジャッジ時間 | 1,141 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,972 KB |
testcase_01 | AC | 16 ms
7,900 KB |
testcase_02 | AC | 107 ms
7,848 KB |
testcase_03 | AC | 16 ms
7,952 KB |
testcase_04 | AC | 16 ms
7,928 KB |
testcase_05 | AC | 16 ms
8,028 KB |
testcase_06 | AC | 16 ms
7,888 KB |
testcase_07 | AC | 16 ms
8,024 KB |
testcase_08 | AC | 15 ms
7,848 KB |
testcase_09 | AC | 16 ms
8,028 KB |
ソースコード
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(i,MAX+1): S1=0 for s in str(i*j): S1+=int(s) if SS==S1: ind+=1 elif SS<S1: #print(i,j,S1) SS=S1 ind=1 print(SS,ind) else: print((8+9*2*N),1)