結果

問題 No.3023 素数判定するだけ
ユーザー 👑 yumechiyumechi
提出日時 2017-04-01 01:20:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 1,143 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 54,420 KB
最終ジャッジ日時 2024-04-15 06:34:58
合計ジャッジ時間 4,439 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,544 KB
testcase_01 AC 38 ms
54,336 KB
testcase_02 AC 37 ms
52,928 KB
testcase_03 AC 37 ms
52,892 KB
testcase_04 AC 38 ms
52,552 KB
testcase_05 AC 37 ms
53,896 KB
testcase_06 AC 38 ms
53,276 KB
testcase_07 AC 37 ms
52,992 KB
testcase_08 AC 37 ms
53,320 KB
testcase_09 AC 36 ms
53,664 KB
testcase_10 AC 35 ms
52,892 KB
testcase_11 AC 36 ms
53,508 KB
testcase_12 AC 35 ms
53,148 KB
testcase_13 AC 38 ms
53,632 KB
testcase_14 AC 35 ms
52,828 KB
testcase_15 AC 37 ms
53,412 KB
testcase_16 AC 36 ms
52,916 KB
testcase_17 AC 37 ms
53,684 KB
testcase_18 AC 37 ms
53,416 KB
testcase_19 AC 36 ms
53,428 KB
testcase_20 AC 37 ms
53,960 KB
testcase_21 AC 38 ms
52,604 KB
testcase_22 AC 36 ms
53,348 KB
testcase_23 AC 36 ms
54,420 KB
testcase_24 AC 36 ms
53,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import sub
n=input()
p=["c","d","f","h","bb","bd","bh","bj","cd","cj","db","dh","eb","ed","eh","fd","fj","gb","gh","hb","hd","hj","id","ij","jh","bab","bad","bah","baj","bbd","bch","bdb","bdh","bdj","bej","bfb","bfh","bgd","bgh","bhd","bhj","bib","bjb","bjd","bjh","bjj","cbb","ccd","cch","ccj","cdd","cdj","ceb","cfb","cfh","cgd","cgj","chb","chh","cib","cid","cjd","dah","dbb","dbd","dbh","ddb","ddh","deh","dej","dfd","dfj","dgh","dhd","dhj","did","dij","djh","eab","eaj","ebj","ecb","edb","edd","edj","eed","eej","efh","egb","egd","egh","ehj","eih","ejb","ejj","fad","faj","fcb","fcd","feb","feh","ffh","fgd","fgj","fhb","fhh","fih","fjd","fjj","gab","gah","gbd","gbh","gbj","gdb","geb","ged","geh","gfd","gfj","ggb","ghd","ghh","gid","gjb","hab","haj","hbj","hch","hdd","hdj","hed","hfb","hfh","hgb","hgj","hhd","hih","hjh","iaj","ibb","icb","icd","ich","icj","idj","ifd","ifh","ifj","igd","ihh","iib","iid","iih","jah","jbb","jbj","jcj","jdh","jeb","jeh","jfd","jgh","jhb","jhh","jid","jjb","jjh"]
l="abcdefghij"
print("YES" if n.translate(str.maketrans("".join([str(sub(ord(c), ord("a"))) for c in l]), l)) in p else "NO")
0