結果

問題 No.883 ぬりえ
ユーザー vwxyzvwxyz
提出日時 2023-07-15 04:47:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 16,548 KB
最終ジャッジ日時 2023-10-14 19:20:04
合計ジャッジ時間 2,520 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,860 KB
testcase_01 AC 14 ms
7,900 KB
testcase_02 AC 14 ms
7,804 KB
testcase_03 AC 14 ms
7,848 KB
testcase_04 AC 14 ms
7,844 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,764 KB
testcase_08 AC 16 ms
7,760 KB
testcase_09 AC 15 ms
7,896 KB
testcase_10 AC 14 ms
7,788 KB
testcase_11 AC 15 ms
7,844 KB
testcase_12 AC 15 ms
7,816 KB
testcase_13 AC 14 ms
7,896 KB
testcase_14 WA -
testcase_15 AC 309 ms
16,548 KB
testcase_16 AC 87 ms
10,572 KB
testcase_17 AC 47 ms
9,376 KB
testcase_18 AC 15 ms
7,872 KB
testcase_19 WA -
testcase_20 AC 15 ms
7,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline

N,K=map(int,readline().split())
H=max((N+K-1)//K,int((N-1)**.5)+1)
ans_lst=[["."]*H for h in range(H)]
for i in range(H):
    for j in range(i,i+K):
        if N:
            ans_lst[i][j%H]="#"
            N-=1
print(H)
for ans in ans_lst:
    print(*ans,sep="")
0