提交时间:2025-02-19 17:29:27

运行 ID: 309367

#include<iostream> using namespace std; bool isP(int x){ if(x <= 1){ return 0; } if(x <= 2){ return 1; } for(int i = 2; i < x; i ++){ if(x % i == 0){ return 0; } } return 1; } int main(){ int n; cin >> n; if(isP(n)){ cout << "T"; } else{ cout << "F"; } return 0; }