結果

問題 No.2525 Great Move
ユーザー chineristACchineristAC
提出日時 2023-11-03 22:32:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 775 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 81,816 KB
実行使用メモリ 89,012 KB
最終ジャッジ日時 2023-11-03 22:32:10
合計ジャッジ時間 5,758 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
89,012 KB
testcase_01 AC 108 ms
89,012 KB
testcase_02 AC 109 ms
89,008 KB
testcase_03 AC 108 ms
89,008 KB
testcase_04 AC 109 ms
89,012 KB
testcase_05 AC 111 ms
85,792 KB
testcase_06 AC 107 ms
85,792 KB
testcase_07 AC 106 ms
85,792 KB
testcase_08 AC 105 ms
85,792 KB
testcase_09 AC 137 ms
85,792 KB
testcase_10 AC 113 ms
88,480 KB
testcase_11 AC 111 ms
87,840 KB
testcase_12 AC 111 ms
88,108 KB
testcase_13 AC 111 ms
88,504 KB
testcase_14 AC 110 ms
88,588 KB
testcase_15 AC 112 ms
88,576 KB
testcase_16 AC 114 ms
88,468 KB
testcase_17 AC 113 ms
87,840 KB
testcase_18 AC 112 ms
87,840 KB
testcase_19 AC 129 ms
87,840 KB
testcase_20 AC 116 ms
85,792 KB
testcase_21 AC 108 ms
85,792 KB
testcase_22 AC 111 ms
85,792 KB
testcase_23 AC 115 ms
85,792 KB
testcase_24 AC 119 ms
85,792 KB
testcase_25 AC 116 ms
85,792 KB
testcase_26 AC 108 ms
85,792 KB
testcase_27 AC 116 ms
85,792 KB
testcase_28 AC 108 ms
85,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import permutations
from heapq import heappop,heappush
from collections import deque
import random
import bisect

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    return (g1[n] * g2[r] % mod) * g2[n-r] % mod


mod = 998244353
N = 10**6 + 100
g1 = [1]*(N+1)
g2 = [1]*(N+1)
inverse = [1]*(N+1)

for i in range( 2, N + 1 ):
    g1[i]=( ( g1[i-1] * i ) % mod )
    inverse[i]=( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2[i]=( (g2[i-1] * inverse[i]) % mod )
inverse[0]=0

from math import gcd

H,S = input().split()

a,b = int(H[-1]) & 1, int(S[-1]) & 1

if (a+b) & 1 == 0:
    print("Possible")
else:
    print("Impossible")
0