結果

問題 No.2775 Nuisance Balls
ユーザー _a_a
提出日時 2024-06-07 21:44:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,783 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2024-06-07 21:44:26
合計ジャッジ時間 1,891 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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, end='	') 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(), 'a1.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):
    D = {'.': 1, 'o': 6, 'R': 30, 'S': 180, 'M': 360, 'C': 720}
    s = A[0]
    res = []
    for k, v in D.items():
        x, y = divmod(s, v)
        res += [(x, y, v, k)]
    res = res[::-1]
    # P(res)
    out = ''
    for x, y, z, ch in res:
        if (s // z) > 0:
            out += (s // z) * ch
            s -= (s // z) * z

    P(out)


solution(A)
0