結果
問題 | No.8023 素数判定するだけ |
ユーザー | yumechi |
提出日時 | 2017-04-01 01:20:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 1,000 ms |
コード長 | 1,143 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,992 KB |
最終ジャッジ日時 | 2024-10-04 20:17:05 |
合計ジャッジ時間 | 4,889 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
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")