結果
問題 | No.2766 Delicious Multiply Spice |
ユーザー | _a |
提出日時 | 2024-06-01 01:52:12 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,846 bytes |
コンパイル時間 | 659 ms |
コンパイル使用メモリ | 12,928 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-06-01 01:52:36 |
合計ジャッジ時間 | 3,390 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 40 ms
11,904 KB |
testcase_01 | AC | 40 ms
11,904 KB |
testcase_02 | AC | 39 ms
11,904 KB |
testcase_03 | AC | 39 ms
11,904 KB |
testcase_04 | AC | 38 ms
11,904 KB |
testcase_05 | AC | 39 ms
11,776 KB |
testcase_06 | AC | 38 ms
11,904 KB |
testcase_07 | AC | 38 ms
11,904 KB |
testcase_08 | AC | 39 ms
11,904 KB |
testcase_09 | RE | - |
testcase_10 | AC | 39 ms
11,904 KB |
testcase_11 | RE | - |
testcase_12 | WA | - |
testcase_13 | RE | - |
testcase_14 | AC | 40 ms
11,904 KB |
testcase_15 | AC | 55 ms
11,776 KB |
testcase_16 | AC | 39 ms
11,776 KB |
testcase_17 | AC | 38 ms
11,776 KB |
testcase_18 | AC | 39 ms
11,904 KB |
testcase_19 | RE | - |
testcase_20 | AC | 38 ms
11,904 KB |
testcase_21 | AC | 37 ms
11,904 KB |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | RE | - |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | RE | - |
testcase_37 | RE | - |
testcase_38 | RE | - |
ソースコード
import os, sys import math, decimal, queue, heapq, bisect, itertools, functools, collections, string from bisect import bisect, bisect_left from collections import defaultdict, OrderedDict, deque, Counter from functools import cmp_to_key, lru_cache, reduce from heapq import heapify, heappush, heappushpop, heappop, heapreplace, nlargest, nsmallest from itertools import accumulate, chain, combinations, combinations_with_replacement, compress, count, cycle, dropwhile, filterfalse, groupby, islice, permutations, product, repeat, starmap, takewhile, tee, zip_longest from math import gcd, factorial, isqrt, comb, perm, prod, inf from queue import Queue, PriorityQueue, LifoQueue from string import ascii_letters, ascii_lowercase, ascii_uppercase, digits, hexdigits, octdigits LOCAL = sys.argv[0] if '4a' in sys.argv[0] else None P = lambda *p: [print(i) for i in p] if LOCAL else None PI = lambda *p: print(' '.join(map(str, p))) or None PII = lambda X: [PI(*row) for row in X] sys.stdin = open(os.path.join(os.getcwd(), 'a3.txt'), 'r') if LOCAL else sys.stdin I = lambda: [int(a) for l in sys.stdin for a in l.strip().split()] S = lambda: [a for l in sys.stdin for a in l.strip().split()] IM = lambda: [[int(a) for a in l.split()] for l in sys.stdin] SM = lambda: [[a for a in l.split()] for l in sys.stdin] az, AZ, mod = ascii_lowercase, ascii_uppercase, 1_000_000_007 A = I() P(A) def solution(A): def sol(x, y, res=''): if x < 3: return res if x >= 3 and (x - 1) % 2 == 0: x -= 1 x //= 2 res += 'A' if x >= 4 and (x - 1) % 3 == 0: x -= 1 x //= 3 res += 'B' # try: return sol(x, y, res) # except: # return '' x, y = A[0], A[0] ans = sol(x, y, '') print(ans[::-1]) solution(A)