結果

問題 No.1185 完全な3の倍数
ユーザー kozykozy
提出日時 2020-08-22 14:42:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 630 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-23 09:03:55
合計ジャッジ時間 73,999 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys
import math
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
def a(X):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%4)+out
        X_dumy = int(X_dumy/4)
    return out
N=int(input())
ans=0
if N<=10:
  print(0)
  exit()
if N<=99:
    print((N//3)-3)
    exit()
for i in range(16,262144):
  s=list(a(i))
  s="".join([str(3*int(i)) for i in s])
  s=int(s)
  if s<=N:
    ans+=1
print(ans+30)
0