結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
![]() |
提出日時 | 2015-12-27 17:39:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 588 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-19 07:25:22 |
合計ジャッジ時間 | 2,991 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 2 |
ソースコード
T, A, B = map(int, input().split()) if T == 0 and A+B>0: print('NO') exit() elif A <= T and B <= T: print('YES') else: print('NO') exit() x = 0 y = 0 t = 0 while t < T: dy = A - y dx = B - x dt = T - t t += 1 s = '' if dy > 0 or (dy == 0 and (dy - dt) % 2 == 0): s += '^' y += 1 elif dy < 0: s += 'v' y -= 1 if dx > 0 or (dx == 0 and (dx - dt) % 2 == 0): s += '>' x += 1 elif dx < 0: s += '<' x -= 1 if s == '': s += '>' x += 1 print(s)