結果
| 問題 |
No.1407 Kindness
|
| コンテスト | |
| ユーザー |
OohMajestic!
|
| 提出日時 | 2021-02-26 22:26:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 446 bytes |
| コンパイル時間 | 210 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,692 KB |
| 最終ジャッジ日時 | 2024-10-02 15:13:36 |
| 合計ジャッジ時間 | 5,261 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 10 RE * 17 TLE * 1 -- * 8 |
ソースコード
N = int(input())
keta = len(str(N))
def summation(n):
return (1 + n) * n // 2
def ssummation(n, keta):
base = 1
additional = 0
for i in range(keta - 1):
base *= 45
if (i != 0):
additional += 45 ** i
return summation(n) * base + additional
if (keta == 1):
print(summation(N))
exit()
sum = 0
for i in range(keta):
sum += ssummation(int(str(N)[i]), keta - i)
print(sum % 1000000007)
OohMajestic!