結果
問題 | No.1312 Snake Eyes |
ユーザー | buey_t |
提出日時 | 2023-03-23 11:11:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,794 bytes |
コンパイル時間 | 193 ms |
コンパイル使用メモリ | 81,732 KB |
実行使用メモリ | 89,704 KB |
最終ジャッジ日時 | 2023-10-18 19:27:35 |
合計ジャッジ時間 | 26,336 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 129 ms
84,168 KB |
testcase_01 | AC | 130 ms
84,392 KB |
testcase_02 | AC | 132 ms
84,176 KB |
testcase_03 | AC | 128 ms
84,168 KB |
testcase_04 | AC | 130 ms
84,388 KB |
testcase_05 | AC | 127 ms
84,392 KB |
testcase_06 | AC | 128 ms
84,388 KB |
testcase_07 | AC | 130 ms
84,172 KB |
testcase_08 | AC | 127 ms
84,184 KB |
testcase_09 | AC | 128 ms
84,168 KB |
testcase_10 | AC | 130 ms
84,188 KB |
testcase_11 | AC | 131 ms
84,176 KB |
testcase_12 | AC | 126 ms
84,176 KB |
testcase_13 | AC | 127 ms
84,172 KB |
testcase_14 | AC | 126 ms
84,388 KB |
testcase_15 | AC | 126 ms
84,176 KB |
testcase_16 | AC | 127 ms
84,392 KB |
testcase_17 | AC | 125 ms
84,172 KB |
testcase_18 | AC | 125 ms
84,168 KB |
testcase_19 | AC | 127 ms
84,172 KB |
testcase_20 | AC | 127 ms
84,172 KB |
testcase_21 | AC | 127 ms
84,168 KB |
testcase_22 | AC | 151 ms
88,924 KB |
testcase_23 | AC | 156 ms
88,960 KB |
testcase_24 | AC | 173 ms
89,268 KB |
testcase_25 | AC | 155 ms
89,216 KB |
testcase_26 | AC | 150 ms
88,940 KB |
testcase_27 | AC | 216 ms
89,268 KB |
testcase_28 | AC | 128 ms
84,172 KB |
testcase_29 | AC | 153 ms
89,224 KB |
testcase_30 | AC | 162 ms
89,248 KB |
testcase_31 | AC | 161 ms
89,224 KB |
testcase_32 | AC | 152 ms
88,968 KB |
testcase_33 | AC | 171 ms
89,192 KB |
testcase_34 | AC | 153 ms
89,228 KB |
testcase_35 | AC | 182 ms
89,276 KB |
testcase_36 | AC | 154 ms
88,984 KB |
testcase_37 | AC | 165 ms
89,284 KB |
testcase_38 | AC | 168 ms
89,272 KB |
testcase_39 | WA | - |
testcase_40 | AC | 234 ms
89,552 KB |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | AC | 226 ms
89,280 KB |
testcase_46 | WA | - |
testcase_47 | AC | 428 ms
89,284 KB |
testcase_48 | AC | 567 ms
89,432 KB |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | AC | 458 ms
89,608 KB |
testcase_57 | WA | - |
testcase_58 | WA | - |
testcase_59 | AC | 319 ms
89,608 KB |
testcase_60 | WA | - |
testcase_61 | WA | - |
testcase_62 | AC | 351 ms
89,488 KB |
testcase_63 | AC | 155 ms
88,968 KB |
testcase_64 | AC | 126 ms
84,172 KB |
testcase_65 | AC | 127 ms
84,180 KB |
testcase_66 | AC | 142 ms
88,836 KB |
testcase_67 | AC | 126 ms
84,172 KB |
testcase_68 | AC | 127 ms
84,176 KB |
testcase_69 | AC | 127 ms
84,172 KB |
testcase_70 | AC | 134 ms
84,172 KB |
testcase_71 | AC | 124 ms
84,176 KB |
testcase_72 | AC | 126 ms
84,172 KB |
testcase_73 | AC | 127 ms
84,184 KB |
testcase_74 | AC | 126 ms
84,176 KB |
testcase_75 | AC | 129 ms
84,180 KB |
testcase_76 | AC | 594 ms
89,608 KB |
testcase_77 | AC | 616 ms
89,608 KB |
testcase_78 | AC | 600 ms
89,608 KB |
testcase_79 | AC | 128 ms
84,392 KB |
testcase_80 | AC | 619 ms
89,608 KB |
testcase_81 | AC | 497 ms
89,608 KB |
testcase_82 | AC | 180 ms
89,608 KB |
testcase_83 | WA | - |
testcase_84 | AC | 627 ms
89,608 KB |
testcase_85 | AC | 127 ms
84,396 KB |
testcase_86 | AC | 128 ms
84,168 KB |
testcase_87 | WA | - |
ソースコード
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**6+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() for i in range(1,int(sqrt(N))+1): if N%i == 0: j = N//i p = j-1 if 1<=i<p: print(p) exit() if __name__ == '__main__': main()