結果
問題 |
No.1226 I hate Robot Arms
|
ユーザー |
![]() |
提出日時 | 2020-08-29 17:30:22 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 474 bytes |
コンパイル時間 | 422 ms |
コンパイル使用メモリ | 82,536 KB |
実行使用メモリ | 138,452 KB |
最終ジャッジ日時 | 2025-01-01 20:37:17 |
合計ジャッジ時間 | 84,989 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 TLE * 27 |
ソースコード
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))