結果
| 問題 |
No.1185 完全な3の倍数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-24 12:37:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 292 bytes |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-25 11:25:56 |
| 合計ジャッジ時間 | 2,629 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 22 |
ソースコード
n=int(input())
if n<100:
print(n//3-3)
else:
e=len(str(n))-1
s=[0,30,48,192,768,3072,12288,49152,196608,786432,3145728]
m=0
for i in range(e):
m+=s[i]
l=[int(i)//3+1 for i in list(str(n).strip())]
l[0]-=1
a=1
for i in l:
a*=i
print(m+a)