結果

問題 No.1185 完全な3の倍数
ユーザー rlangevinrlangevin
提出日時 2023-01-15 17:37:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 260 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 77,352 KB
最終ジャッジ日時 2023-08-28 10:06:08
合計ジャッジ時間 13,582 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 254 ms
77,184 KB
testcase_01 AC 254 ms
77,044 KB
testcase_02 AC 246 ms
77,224 KB
testcase_03 AC 253 ms
77,112 KB
testcase_04 AC 251 ms
77,116 KB
testcase_05 AC 252 ms
77,116 KB
testcase_06 AC 251 ms
77,352 KB
testcase_07 AC 252 ms
77,180 KB
testcase_08 AC 253 ms
77,016 KB
testcase_09 AC 246 ms
77,232 KB
testcase_10 AC 247 ms
77,072 KB
testcase_11 AC 248 ms
77,100 KB
testcase_12 AC 248 ms
77,164 KB
testcase_13 AC 248 ms
77,100 KB
testcase_14 AC 247 ms
77,336 KB
testcase_15 AC 246 ms
77,308 KB
testcase_16 AC 248 ms
77,104 KB
testcase_17 AC 252 ms
77,020 KB
testcase_18 AC 245 ms
77,340 KB
testcase_19 AC 252 ms
77,176 KB
testcase_20 AC 259 ms
77,212 KB
testcase_21 AC 252 ms
77,212 KB
testcase_22 AC 249 ms
77,152 KB
testcase_23 AC 255 ms
77,120 KB
testcase_24 AC 250 ms
77,024 KB
testcase_25 AC 251 ms
77,232 KB
testcase_26 AC 254 ms
77,336 KB
testcase_27 AC 255 ms
77,232 KB
testcase_28 AC 251 ms
77,128 KB
testcase_29 AC 259 ms
77,092 KB
testcase_30 AC 260 ms
77,128 KB
testcase_31 AC 251 ms
77,112 KB
testcase_32 AC 252 ms
77,140 KB
testcase_33 AC 252 ms
77,092 KB
testcase_34 AC 252 ms
77,236 KB
testcase_35 AC 251 ms
77,340 KB
testcase_36 AC 251 ms
77,276 KB
testcase_37 AC 253 ms
77,116 KB
testcase_38 AC 251 ms
77,284 KB
testcase_39 AC 249 ms
77,104 KB
testcase_40 AC 247 ms
77,204 KB
testcase_41 AC 255 ms
77,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import *

N = int(input())
ans = 0
for i in range(10, min(100, N + 1)):
    s = str(i)
    a, b = int(s[0]), int(s[1])
    if (a + b) % 3 == 0:
        ans += 1
        
for tup in product(["3", "6", "9", "0"], repeat=10):
    n = int("".join(tup))
    if 100 < n <= N:
        ans += 1
print(ans)
0