結果
問題 |
No.620 ぐるぐるぐるりん
|
ユーザー |
![]() |
提出日時 | 2017-12-20 02:42:24 |
言語 | Perl (5.40.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-16 06:55:09 |
合計ジャッジ時間 | 2,636 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 RE * 1 |
コンパイルメッセージ
Name "main::p" used only once: possible typo at Main.pl line 3. Main.pl syntax OK
ソースコード
<>; for(<>){ ($t,$p,$w,$v,$gx,$gy)=glob; $v+=1; $r=sqrt($v*$v+$w*$w); $a=atan2($w,$v); $z=0; for(1..$t){ $z+=$r**(-2*$_); } { $c=cos($a*$t); $s=sin($a*$t); $dx=($gx/$r**$t-$c)/$z; $dy=($gy/$r**$t-$s)/$z; } for(1..$t){ $c=cos($a*($_-$t)); $s=sin($a*($_-$t)); $x=($dx*$c-$dy*$s)/$r**$_; $y=($dx*$s+$dy*$c)/$r**$_; print $x," ",$y,"\n"; } }