結果

問題 No.232 めぐるはめぐる (2)
ユーザー 👑 KazunKazun
提出日時 2021-06-19 01:59:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 1,000 ms
コード長 560 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,412 KB
実行使用メモリ 89,492 KB
最終ジャッジ日時 2023-09-05 00:37:46
合計ジャッジ時間 4,724 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
89,368 KB
testcase_01 AC 93 ms
78,556 KB
testcase_02 AC 113 ms
89,492 KB
testcase_03 AC 102 ms
84,048 KB
testcase_04 AC 72 ms
71,492 KB
testcase_05 AC 72 ms
71,380 KB
testcase_06 AC 71 ms
71,204 KB
testcase_07 AC 71 ms
71,172 KB
testcase_08 AC 106 ms
80,164 KB
testcase_09 AC 73 ms
71,572 KB
testcase_10 AC 73 ms
71,056 KB
testcase_11 AC 75 ms
71,288 KB
testcase_12 AC 73 ms
71,544 KB
testcase_13 AC 71 ms
71,396 KB
testcase_14 AC 71 ms
71,572 KB
testcase_15 AC 71 ms
71,580 KB
testcase_16 AC 69 ms
71,428 KB
testcase_17 AC 71 ms
71,464 KB
testcase_18 AC 78 ms
75,524 KB
testcase_19 AC 71 ms
71,216 KB
testcase_20 AC 71 ms
71,252 KB
testcase_21 AC 71 ms
71,512 KB
testcase_22 AC 71 ms
71,444 KB
testcase_23 AC 73 ms
71,180 KB
testcase_24 AC 70 ms
71,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T,A,B=map(int,input().split())

if T==1:
    if (A,B)==(1,0):
        print("YES")
        print("^")
    elif (A,B)==(0,1):
        print("YES")
        print(">")
    elif (A,B)==(1,1):
        print("YES")
        print("^>")
    else:
        print("NO")
    exit()

if A>T or B>T:
    exit(print("NO"))

X=["^"]*A
while len(X)<T-1:
    X.append("v")
    X.append("^")

if len(X)==T-1:
    X.insert(0,"")

Y=[">"]*B
while len(Y)<T-1:
    Y.append("<")
    Y.append(">")

if len(Y)==T-1:
    Y.insert(1,"")

print("YES")
for x,y in zip(X,Y):
    print(x+y)
0