結果

問題 No.1849 Three Times Value
ユーザー lllllll88938494lllllll88938494
提出日時 2023-04-26 07:11:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 82,588 KB
実行使用メモリ 67,336 KB
最終ジャッジ日時 2024-04-27 13:31:37
合計ジャッジ時間 2,334 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,688 KB
testcase_01 AC 37 ms
52,120 KB
testcase_02 AC 37 ms
52,552 KB
testcase_03 AC 37 ms
52,804 KB
testcase_04 AC 37 ms
52,428 KB
testcase_05 AC 37 ms
52,984 KB
testcase_06 AC 53 ms
66,560 KB
testcase_07 AC 38 ms
52,976 KB
testcase_08 AC 37 ms
53,176 KB
testcase_09 AC 53 ms
66,040 KB
testcase_10 AC 53 ms
67,336 KB
testcase_11 AC 55 ms
67,104 KB
testcase_12 AC 54 ms
66,620 KB
testcase_13 AC 44 ms
59,988 KB
testcase_14 AC 43 ms
60,336 KB
testcase_15 AC 40 ms
54,560 KB
testcase_16 AC 37 ms
51,784 KB
testcase_17 AC 36 ms
51,624 KB
testcase_18 AC 37 ms
51,960 KB
testcase_19 AC 37 ms
52,940 KB
testcase_20 AC 37 ms
53,360 KB
testcase_21 AC 37 ms
52,208 KB
testcase_22 AC 37 ms
51,692 KB
testcase_23 AC 38 ms
53,344 KB
testcase_24 AC 36 ms
52,104 KB
testcase_25 AC 37 ms
53,148 KB
testcase_26 AC 43 ms
60,652 KB
testcase_27 AC 37 ms
52,916 KB
testcase_28 AC 37 ms
52,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()
if len(N) < 3:
    print(0)
    exit()
if len(N)%3 != 0:
    print('9'*(len(N)//3))
    exit()
    
n=N[:len(N)//3]

for i in range(1,10**5 + 1):
    if i > int(n):
        break
    if int(str(i)*3) <= int(N):
        ans = i
print(ans)
0