結果
| 問題 |
No.620 ぐるぐるぐるりん
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2017-12-20 00:32:30 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 536 ms |
| コンパイル使用メモリ | 7,076 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-16 02:40:43 |
| 合計ジャッジ時間 | 5,268 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 28 |
コンパイルメッセージ
Name "main::p" used only once: possible typo at Main.pl line 3. Main.pl syntax OK
ソースコード
$n=<>;
for(1..$n){
($t,$p,$w,$v,$gx,$gy)=glob<>;
$v+=1;
$r=sqrt($v*$v+$w*$w);
if($r==1){
$r=$r*$t;
}else{
$r=($r**$t-1)/($r-1);
}
$a=atan2($w,$v);
$dx=$gx/$r;
$dy=$gy/$r;
for(0..$t-1){
$c=cos($a*($_-($t-1)));
$s=sin($a*($_-($t-1)));
$x=$dx*$c-$dy*$s;
$y=$dx*$s+$dy*$c;
print $x," ",$y,"\n";
}
}
tails