Submission #71650669
Source Code Expand
import sys
import string
import math
import bisect
import os
import heapq
import operator
from io import BytesIO, IOBase
from heapq import heappop,heappush
from functools import lru_cache,cache
from collections import deque,defaultdict,Counter,OrderedDict
from itertools import permutations,combinations
from array import array
INF = float('inf')
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._file = file
self._fd = file.fileno()
self.buffer = BytesIO()
self.writable = "x" in file.mode or "r" not in file.mode
self.write = self.buffer.write if self.writable else None
def read(self):
while True:
b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
if not b:
break
ptr = self.buffer.tell()
self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
self.newlines = 0
return self.buffer.read()
def readline(self):
while self.newlines == 0:
b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
self.newlines = b.count(b"\n") + (not b)
ptr = self.buffer.tell()
self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
self.newlines -= 1
return self.buffer.readline()
def flush(self):
if self.writable:
os.write(self._fd, self.buffer.getvalue())
self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
def __init__(self, file):
self.buffer = FastIO(file)
self.flush = self.buffer.flush
self.writable = self.buffer.writable
self.write = lambda s: self.buffer.write(s.encode("ascii"))
self.read = lambda: self.buffer.read().decode("ascii")
self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = sys.stdin.buffer.readline
ask = lambda *x:print('?',*x,flush=True)
reply = lambda *x:print('!',*x,flush=True)
RI = lambda: int(sys.stdin.readline())
RF = lambda: float(sys.stdin.readline())
RS = lambda: sys.stdin.readline().strip()
RFF = lambda: map(float, sys.stdin.readline().split())
RII = lambda: map(int, sys.stdin.readline().split())
RSS = lambda: map(str, sys.stdin.readline().strip().split())
RIL = lambda: list(RII())
RFL = lambda: list(RFF())
RSL = lambda: list(RSS())
from types import GeneratorType
def bootstrap(f, stack=[]):
def wrappedfunc(*args, **kwargs):
if stack:
return f(*args, **kwargs)
else:
to = f(*args, **kwargs)
while True:
if type(to) is GeneratorType:
stack.append(to)
to = next(to)
else:
stack.pop()
if not stack:
break
to = stack[-1].send(to)
return to
return wrappedfunc
def main():
n = RI()
s = RS()
s = 'o'*(n-len(s))+s
print(s)
if __name__ == '__main__':
main()
Submission Info
| Submission Time |
|
| Task |
A - o-padding |
| User |
x3x3 |
| Language |
Python (PyPy 3.11-v7.3.20) |
| Score |
100 |
| Code Size |
3290 Byte |
| Status |
AC |
| Exec Time |
114 ms |
| Memory |
109336 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_test_00.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00_sample_00.txt |
AC |
110 ms |
109304 KiB |
| 00_sample_01.txt |
AC |
113 ms |
109104 KiB |
| 00_sample_02.txt |
AC |
111 ms |
108872 KiB |
| 01_test_00.txt |
AC |
114 ms |
109336 KiB |
| 01_test_01.txt |
AC |
112 ms |
108952 KiB |
| 01_test_02.txt |
AC |
110 ms |
108948 KiB |
| 01_test_03.txt |
AC |
111 ms |
109308 KiB |
| 01_test_04.txt |
AC |
112 ms |
109248 KiB |
| 01_test_05.txt |
AC |
111 ms |
108868 KiB |
| 01_test_06.txt |
AC |
112 ms |
109272 KiB |
| 01_test_07.txt |
AC |
112 ms |
109108 KiB |
| 01_test_08.txt |
AC |
112 ms |
109304 KiB |
| 01_test_09.txt |
AC |
111 ms |
109304 KiB |