結果

問題 No.1185 完全な3の倍数
ユーザー tyawanmusityawanmusi
提出日時 2020-08-22 17:09:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 547 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-08-16 00:29:11
合計ジャッジ時間 8,632 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 159 ms
7,820 KB
testcase_01 AC 136 ms
7,820 KB
testcase_02 AC 134 ms
7,796 KB
testcase_03 AC 156 ms
7,808 KB
testcase_04 AC 156 ms
7,808 KB
testcase_05 AC 155 ms
7,996 KB
testcase_06 AC 159 ms
7,920 KB
testcase_07 AC 152 ms
7,912 KB
testcase_08 AC 158 ms
7,844 KB
testcase_09 AC 146 ms
7,964 KB
testcase_10 AC 137 ms
7,912 KB
testcase_11 AC 141 ms
7,872 KB
testcase_12 AC 139 ms
7,844 KB
testcase_13 AC 136 ms
7,808 KB
testcase_14 AC 145 ms
7,808 KB
testcase_15 AC 148 ms
7,864 KB
testcase_16 AC 146 ms
7,872 KB
testcase_17 AC 137 ms
7,872 KB
testcase_18 AC 140 ms
7,972 KB
testcase_19 AC 142 ms
7,856 KB
testcase_20 AC 153 ms
7,916 KB
testcase_21 AC 154 ms
7,808 KB
testcase_22 AC 145 ms
7,860 KB
testcase_23 AC 139 ms
7,812 KB
testcase_24 AC 159 ms
7,816 KB
testcase_25 AC 140 ms
7,912 KB
testcase_26 AC 146 ms
7,824 KB
testcase_27 AC 143 ms
7,916 KB
testcase_28 AC 151 ms
7,852 KB
testcase_29 AC 147 ms
7,876 KB
testcase_30 AC 147 ms
7,844 KB
testcase_31 AC 137 ms
7,820 KB
testcase_32 AC 150 ms
7,780 KB
testcase_33 AC 142 ms
7,780 KB
testcase_34 AC 149 ms
7,916 KB
testcase_35 AC 174 ms
7,880 KB
testcase_36 AC 168 ms
7,860 KB
testcase_37 AC 177 ms
7,804 KB
testcase_38 AC 170 ms
8,000 KB
testcase_39 AC 153 ms
7,864 KB
testcase_40 AC 157 ms
7,784 KB
testcase_41 AC 155 ms
7,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ans=0
for i in range(10,min(100,n+1)):
  if i%3==0:ans+=1
for i0 in range(0,10**9,3*10**8):
  for i1 in range(0,10**8,3*10**7):
    for i2 in range(0,10**7,3*10**6):
      for i3 in range(0,10**6,3*10**5):
        for i4 in range(0,10**5,3*10**4):
          for i5 in range(0,10**4,3*10**3):
            for i6 in range(0,10**3,3*10**2):
              for i7 in range(0,10**2,3*10**1):
                for i8 in range(0,10**1,3**10**0):
                  s=i0+i1+i2+i3+i4+i5+i6+i7+i8
                  if 100<=s<=n:ans+=1
print(ans)
0