結果

問題 No.1109 調の判定
ユーザー tails
提出日時 2020-07-10 21:28:42
言語 Perl
(5.40.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2024-10-11 07:48:01
合計ジャッジ時間 1,554 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "x" may clash with future reserved word at Main.pl line 5.
Unquoted string "oxoxooxoxoxo" may clash with future reserved word at Main.pl line 5.
Name "main::n" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

$n=<>;
@t=glob<>;
$d=-2;
for$a(0..11){
	grep{x eq substr oxoxooxoxoxo,($_-$a)%12,1}@t or $d=$d==-2?$a:-1;
}
print $d==-2?-1:$d
0