結果

問題 No.620 ぐるぐるぐるりん
ユーザー tailstails
提出日時 2017-12-20 12:00:17
言語 Perl
(5.38.0)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 390 bytes
コンパイル時間 640 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 5,904 KB
最終ジャッジ日時 2023-09-03 21:26:20
合計ジャッジ時間 2,101 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,612 KB
testcase_01 AC 6 ms
5,664 KB
testcase_02 AC 6 ms
5,764 KB
testcase_03 AC 6 ms
5,904 KB
testcase_04 AC 6 ms
5,608 KB
testcase_05 AC 6 ms
5,840 KB
testcase_06 AC 6 ms
5,608 KB
testcase_07 AC 6 ms
5,616 KB
testcase_08 AC 6 ms
5,864 KB
testcase_09 AC 6 ms
5,568 KB
testcase_10 AC 6 ms
5,664 KB
testcase_11 AC 6 ms
5,704 KB
testcase_12 AC 7 ms
5,692 KB
testcase_13 AC 6 ms
5,644 KB
testcase_14 AC 6 ms
5,672 KB
testcase_15 AC 6 ms
5,744 KB
testcase_16 AC 6 ms
5,696 KB
testcase_17 AC 6 ms
5,568 KB
testcase_18 AC 6 ms
5,672 KB
testcase_19 AC 6 ms
5,700 KB
testcase_20 AC 6 ms
5,652 KB
testcase_21 AC 6 ms
5,848 KB
testcase_22 AC 6 ms
5,836 KB
testcase_23 AC 7 ms
5,840 KB
testcase_24 AC 6 ms
5,760 KB
testcase_25 AC 6 ms
5,716 KB
testcase_26 AC 40 ms
5,740 KB
testcase_27 AC 6 ms
5,452 KB
testcase_28 AC 40 ms
5,628 KB
testcase_29 AC 40 ms
5,840 KB
testcase_30 AC 40 ms
5,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::p" used only once: possible typo at Main.pl line 3.
Main.pl syntax OK

ソースコード

diff #

$n=<>;
for(1..$n){
	($t,$p,$w,$v,$gx,$gy)=glob<>;
	$v+=1;
	$r=sqrt($v*$v+$w*$w);
	$z=0;
	for(1..$t){
		$z+=$r**(2*($t-$_));
	}
	$a=atan2($w,$v);
	{
		$c=cos($a*$t);
		$s=sin($a*$t);
		$dx=($gx-$c*$r**$t)/$z;
		$dy=($gy-$s*$r**$t)/$z;
	}
	for(1..$t){
		$c=cos($a*($_-$t));
		$s=sin($a*($_-$t));
		$x=($dx*$c-$dy*$s)*$r**($t-$_);
		$y=($dx*$s+$dy*$c)*$r**($t-$_);
		print $x," ",$y,"\n";
	}
}
0