結果
問題 | No.883 ぬりえ |
ユーザー | simamumu |
提出日時 | 2019-09-13 21:33:51 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 657 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 11,044 KB |
実行使用メモリ | 19,880 KB |
最終ジャッジ日時 | 2023-09-17 06:58:53 |
合計ジャッジ時間 | 2,237 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
9,936 KB |
testcase_01 | AC | 31 ms
10,096 KB |
testcase_02 | AC | 31 ms
9,980 KB |
testcase_03 | AC | 30 ms
9,940 KB |
testcase_04 | AC | 30 ms
10,004 KB |
testcase_05 | AC | 31 ms
10,100 KB |
testcase_06 | AC | 31 ms
9,944 KB |
testcase_07 | AC | 31 ms
10,088 KB |
testcase_08 | AC | 31 ms
9,996 KB |
testcase_09 | AC | 30 ms
10,160 KB |
testcase_10 | WA | - |
testcase_11 | AC | 31 ms
10,020 KB |
testcase_12 | AC | 30 ms
10,016 KB |
testcase_13 | AC | 30 ms
9,940 KB |
testcase_14 | AC | 31 ms
9,988 KB |
testcase_15 | AC | 68 ms
19,880 KB |
testcase_16 | AC | 39 ms
12,452 KB |
testcase_17 | WA | - |
testcase_18 | AC | 30 ms
9,952 KB |
testcase_19 | AC | 30 ms
9,972 KB |
testcase_20 | AC | 32 ms
10,036 KB |
ソースコード
from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,copy,time sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inp(): return int(sys.stdin.readline()) def inpl(): return list(map(int, sys.stdin.readline().split())) def inpl_str(): return list(sys.stdin.readline().split()) N,K = inpl() W = max(N//K,math.ceil(math.sqrt(N))) MAP = [['.']*W for _ in range(W)] x = y = 0 k = 0 for _ in range(N): MAP[y][x] = '#' if k>0 and k%W == W-1: x += 1 else: x += 1 y += 1 x %= W y %= W k += 1 print(W) print('\n'.join([''.join(m) for m in MAP]))