結果
| 問題 | No.1226 I hate Robot Arms |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-29 17:30:22 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 474 bytes |
| 記録 | |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 135,424 KB |
| 最終ジャッジ日時 | 2026-06-05 15:42:59 |
| 合計ジャッジ時間 | 5,903 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | TLE * 2 -- * 26 |
ソースコード
from math import radians, sin, cos
n,q=map(int,input().split())
theta=[0]*n
length=[1]*n
for _ in range(q):
query=list(map(int,input().split()))
if query[0]==0:
_,i,x=query
theta[i-1]=x
elif query[0]==1:
_,i,x=query
length[i-1]=x
else:
_,i=query
x=y=0
the=0
for j in range(i):
the+=theta[j]
the%=360
x+=length[j]*cos(radians(the))
y+=length[j]*sin(radians(the))
print('{:.9f}'.format(x),'{:.9f}'.format(y))