結果
| 問題 | No.2655 Increasing Strides |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-01 21:31:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 359 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 58,496 KB |
| 最終ジャッジ日時 | 2026-04-15 22:17:12 |
| 合計ジャッジ時間 | 2,644 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")