結果

問題 No.883 ぬりえ
ユーザー tcltktcltk
提出日時 2021-11-18 07:23:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 730 bytes
コンパイル時間 880 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 84,716 KB
最終ジャッジ日時 2023-08-26 12:14:27
合計ジャッジ時間 8,098 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
80,856 KB
testcase_01 AC 180 ms
80,832 KB
testcase_02 AC 174 ms
80,896 KB
testcase_03 AC 177 ms
80,636 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 180 ms
80,836 KB
testcase_07 WA -
testcase_08 AC 181 ms
80,664 KB
testcase_09 WA -
testcase_10 AC 176 ms
80,796 KB
testcase_11 AC 182 ms
80,752 KB
testcase_12 AC 177 ms
80,596 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 212 ms
84,716 KB
testcase_16 AC 189 ms
84,260 KB
testcase_17 AC 189 ms
83,420 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq


def input():
    return sys.stdin.readline()[:-1]


# sys.setrecursionlimit(1000000)

# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)

INF = 10**10


N, K = map(int, input().split())

n = N // (K*K)
k = 0
while n * (K*K) + k*k < N:
    k += 1

M = K*n + k
A = [['.'] * M for _ in range(M)]
for n1 in range(n):
    for i in range(K*n1, K*(n1+1)):
        for j in range(K*n1, K*(n1+1)):
            A[i][j] = '#'
for i in range(K*n, K*n+k):
    for j in range(K*n, K*n+k):
        A[i][j] = '#'

print(M)
for i in range(M):
    print(''.join(A[i]))
0