結果

問題 No.1312 Snake Eyes
ユーザー buey_tbuey_t
提出日時 2023-03-23 10:20:43
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 1,602 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 81,712 KB
実行使用メモリ 93,976 KB
最終ジャッジ日時 2023-10-18 19:26:11
合計ジャッジ時間 10,225 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
91,388 KB
testcase_01 AC 127 ms
84,416 KB
testcase_02 AC 130 ms
84,408 KB
testcase_03 AC 127 ms
84,416 KB
testcase_04 AC 128 ms
84,416 KB
testcase_05 AC 127 ms
84,416 KB
testcase_06 AC 127 ms
84,408 KB
testcase_07 AC 129 ms
84,416 KB
testcase_08 AC 128 ms
84,416 KB
testcase_09 AC 126 ms
84,420 KB
testcase_10 AC 126 ms
84,412 KB
testcase_11 AC 126 ms
84,408 KB
testcase_12 AC 127 ms
84,416 KB
testcase_13 AC 127 ms
84,412 KB
testcase_14 AC 128 ms
84,408 KB
testcase_15 AC 126 ms
84,412 KB
testcase_16 AC 126 ms
84,416 KB
testcase_17 AC 125 ms
84,412 KB
testcase_18 AC 123 ms
84,420 KB
testcase_19 AC 123 ms
84,412 KB
testcase_20 AC 126 ms
84,412 KB
testcase_21 AC 127 ms
84,420 KB
testcase_22 AC 142 ms
88,920 KB
testcase_23 AC 146 ms
88,972 KB
testcase_24 AC 161 ms
89,272 KB
testcase_25 AC 154 ms
89,236 KB
testcase_26 AC 148 ms
88,964 KB
testcase_27 AC 214 ms
89,268 KB
testcase_28 AC 129 ms
84,416 KB
testcase_29 AC 153 ms
89,248 KB
testcase_30 AC 158 ms
89,264 KB
testcase_31 AC 155 ms
89,248 KB
testcase_32 AC 150 ms
88,964 KB
testcase_33 AC 176 ms
89,192 KB
testcase_34 AC 154 ms
89,248 KB
testcase_35 AC 179 ms
89,272 KB
testcase_36 AC 151 ms
89,016 KB
testcase_37 AC 162 ms
89,276 KB
testcase_38 AC 168 ms
89,284 KB
testcase_39 TLE -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
testcase_78 -- -
testcase_79 -- -
testcase_80 -- -
testcase_81 -- -
testcase_82 -- -
testcase_83 -- -
testcase_84 -- -
testcase_85 -- -
testcase_86 -- -
testcase_87 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
    from heapq import heapify, heappop, heappush
    from bisect import bisect_left, bisect_right
    from copy import deepcopy
    import copy
    import random
    from collections import deque,Counter,defaultdict
    from itertools import permutations,combinations
    from decimal import Decimal,ROUND_HALF_UP
    #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    from functools import lru_cache, reduce
    #@lru_cache(maxsize=None)
    from operator import add,sub,mul,xor,and_,or_,itemgetter
    INF = 10**18
    mod1 = 10**9+7
    mod2 = 998244353
    
    #DecimalならPython
    
    
    '''
    
    
    
    '''
    
    def Dec_to_N(num, base):
        if num >= base:
            yield from Dec_to_N(num // base, base)
        yield num % base

    def N_to_Dec(digits, base):
        num = 0
        for digit in digits:
            num = num * base + digit
        return num

    
    N = int(input())
    
    for i in range(2,10**9+1):
        ls = list(Dec_to_N(N,i))
        
        f = True
        n = ls[0]
        if n == 0:
            continue
        for j in range(len(ls)):
            if ls[j] != n:
                f = False
                break
        
        if f:
            print(i)
            exit()
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0