結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-01 21:31:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 285 bytes |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 82,416 KB |
| 実行使用メモリ | 60,592 KB |
| 最終ジャッジ日時 | 2024-09-29 13:33:02 |
| 合計ジャッジ時間 | 2,515 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 10 |
ソースコード
import sys
input = sys.stdin.readline
N = int(input())
now = [0, 0]
d = 0
dir = [(0, 1), (-1, 0), (0, -1), (1, 0)]
for i in range(1, N+1):
dx, dy = dir[d]
now[0] += dx*i
now[1] += dy*i
d += 1
d %= 4
if now[0]==0 and now[1]==0:
print("Yes")
else:
print("No")