結果

問題 No.883 ぬりえ
ユーザー 👑 tatyamtatyam
提出日時 2019-09-14 08:27:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 10,944 KB
実行使用メモリ 8,480 KB
最終ジャッジ日時 2023-09-18 17:40:08
合計ジャッジ時間 3,618 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,864 KB
testcase_01 AC 17 ms
7,872 KB
testcase_02 AC 17 ms
7,856 KB
testcase_03 AC 16 ms
8,000 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,952 KB
testcase_06 AC 16 ms
7,928 KB
testcase_07 AC 16 ms
7,864 KB
testcase_08 AC 17 ms
8,000 KB
testcase_09 AC 16 ms
7,804 KB
testcase_10 AC 17 ms
7,852 KB
testcase_11 AC 17 ms
7,880 KB
testcase_12 AC 16 ms
7,784 KB
testcase_13 AC 17 ms
7,904 KB
testcase_14 AC 17 ms
7,904 KB
testcase_15 AC 1,009 ms
8,480 KB
testcase_16 AC 254 ms
8,408 KB
testcase_17 AC 125 ms
8,332 KB
testcase_18 AC 17 ms
7,960 KB
testcase_19 WA -
testcase_20 AC 16 ms
7,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
EPS = 1e-6
for i in range(1, 2001):
    if n / min(k, i) <= i + EPS:
        print(i)
        at = 0
        cnt = 0
        r = [(min(j * k, n), min((j + 1) * k, n)) for j in range(i)]
        for x in range(i):
            for y in range(i):
                ans = '.'
                if r[y][1] % i > r[y][0] % i:
                    if r[y][1] % i > x and x >= r[y][0] % i:
                        ans = '#'
                elif x >= r[y][0] % i or r[y][1] % i > x:
                    ans = '#'
                print(ans, end="")
            print()
        break
0