結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー |
|
提出日時 | 2023-09-16 19:40:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,166 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 82,292 KB |
実行使用メモリ | 76,392 KB |
最終ジャッジ日時 | 2024-07-03 19:04:38 |
合計ジャッジ時間 | 3,985 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 13 |
ソースコード
t, a, b = map(int, input().split()) if a > t or b > t: print("NO") exit() print("YES") aa = t - (t - a) % 2 bb = t - (t - b) % 2 ca, cb = 0, 0 if aa < t and bb < t: for i in range(t): if i == 0: print('^') ca += 1 elif i == t - 1: if cb < b: print('>') else: print('<') cb += 1 else: res = '' if ca <= a: res += '^' else: res += 'v' if cb <= b: res += '>' else: res += '<' print(res) ca += 1 cb += 1 else: for i in range(t): res = '' if i == 0: if a == t: res += '^' ca += 1 if b == t: res += '>' cb += 1 else: if ca <= a: res += '^' else: res += 'v' if cb <= b: res += '>' else: res += '<' ca += 1 cb += 1 print(res)