結果

問題 No.2432 Flip and Move
ユーザー tassei903tassei903
提出日時 2023-08-11 14:09:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 475 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 159,104 KB
最終ジャッジ日時 2024-05-06 02:09:08
合計ジャッジ時間 8,501 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,968 KB
testcase_01 AC 35 ms
51,712 KB
testcase_02 AC 111 ms
93,056 KB
testcase_03 AC 475 ms
159,104 KB
testcase_04 AC 90 ms
83,456 KB
testcase_05 AC 91 ms
83,328 KB
testcase_06 AC 82 ms
84,096 KB
testcase_07 AC 330 ms
130,048 KB
testcase_08 AC 357 ms
134,400 KB
testcase_09 AC 456 ms
155,904 KB
testcase_10 AC 106 ms
87,040 KB
testcase_11 AC 103 ms
88,576 KB
testcase_12 AC 95 ms
84,864 KB
testcase_13 AC 96 ms
88,320 KB
testcase_14 AC 181 ms
95,488 KB
testcase_15 AC 416 ms
144,128 KB
testcase_16 AC 99 ms
78,720 KB
testcase_17 AC 180 ms
83,456 KB
testcase_18 AC 100 ms
78,720 KB
testcase_19 AC 142 ms
82,048 KB
testcase_20 AC 148 ms
84,864 KB
testcase_21 AC 134 ms
81,536 KB
testcase_22 AC 126 ms
81,536 KB
testcase_23 AC 95 ms
78,464 KB
testcase_24 AC 149 ms
83,072 KB
testcase_25 AC 131 ms
81,664 KB
testcase_26 AC 117 ms
83,072 KB
testcase_27 AC 61 ms
68,096 KB
testcase_28 AC 62 ms
67,456 KB
testcase_29 AC 114 ms
80,512 KB
testcase_30 AC 141 ms
83,968 KB
testcase_31 AC 116 ms
81,280 KB
testcase_32 AC 61 ms
67,328 KB
testcase_33 AC 165 ms
83,456 KB
testcase_34 AC 117 ms
79,232 KB
testcase_35 AC 126 ms
81,408 KB
testcase_36 AC 42 ms
51,840 KB
testcase_37 AC 35 ms
51,968 KB
testcase_38 AC 38 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w = map(int, input().split())
k = int(input())

s = [[0 for j in range(w)] for i in range(h)]

from math import gcd
d = gcd(h, w) * 2

l = h * w * 4 // d

for t in range(l):
    i = t % (2 * h)
    j = t % (2 * w)
    s[min(i, 2 * h-1-i)][min(j, 2 * w-1-j)] += max((k-t+l-1)//l, 0)

for i in range(h):
    print("".join([[".", "#"][j%2] for j in s[i]]))
0