結果

問題 No.8114 Prime Checker+1
ユーザー titia
提出日時 2025-06-09 01:45:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-06-09 01:45:54
合計ジャッジ時間 3,287 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=input().strip()

if len(N)<=3:
    N=int(N)

    if N==2:
        print(0)
        print("Yes")
    else:
        if N%2==0:
            print(0)
            print("No")
        else:
            print(1)
            print("No")
else:
    N=int(N[-1])
    if N%2==0:
        print(0)
        print("No")
    else:
        print(1)
        print("No")
0