Logo
(追記) (追記ここまで)

21088번 - Remove the Prime 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
6 초 256 MB8861609214.330%

문제

Two players play a game using an array of positive integers. They make alternating moves, the player who cannot make a move loses. In one move you have to choose a prime number $p$ and a non-empty segment $[l;r]$ of the array such that all numbers in this segment are divisible by $p,ドル and then remove all factors $p$ from each of them. Removing all factors means that we take a number and divide it by $p$ while it is divisible.

Determine who wins if both players play optimally.

입력

The first line contains one integer $n$ (1ドル \le n \le 1000$) --- the size of array.

The second line contains the array $a_{1}, a_{2}, \ldots, a_{n}$ itself (1ドル \le a_{i} \le 10^{18}$).

출력

Print "First" (without quotes) if first player wins and "Second" (without quotes) otherwise.

제한

예제 입력 1

3
2 8 4

예제 출력 1

First

예제 입력 2

3
2 12 3

예제 출력 2

Second

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2021 > Day 5: Almost Retired Dandelion Contest, ICPC Camp Contest 2 G번

Contest > Open Cup > 2020/2021 Season > Stage 11: Grand Prix of Nizhny Novgorod G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /