結果

問題 No.1185 完全な3の倍数
ユーザー Noah CollinsNoah Collins
提出日時 2022-11-24 12:37:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 11,944 KB
実行使用メモリ 10,140 KB
最終ジャッジ日時 2023-10-26 03:30:57
合計ジャッジ時間 3,480 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
10,060 KB
testcase_02 AC 28 ms
10,060 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 29 ms
10,060 KB
testcase_09 AC 28 ms
10,060 KB
testcase_10 AC 28 ms
10,060 KB
testcase_11 AC 29 ms
10,060 KB
testcase_12 AC 28 ms
10,060 KB
testcase_13 AC 29 ms
10,060 KB
testcase_14 AC 28 ms
10,060 KB
testcase_15 AC 28 ms
10,060 KB
testcase_16 AC 28 ms
10,060 KB
testcase_17 AC 28 ms
10,060 KB
testcase_18 AC 28 ms
10,060 KB
testcase_19 AC 29 ms
10,060 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 28 ms
10,060 KB
testcase_24 WA -
testcase_25 AC 30 ms
10,060 KB
testcase_26 WA -
testcase_27 AC 29 ms
10,060 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 28 ms
10,060 KB
testcase_40 AC 28 ms
10,060 KB
testcase_41 AC 28 ms
10,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0