2 条题解

  • 0
    @ 2025-5-1 8:28:46
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	cout<<1;
    	return 0;
    }
    
    • 0
      @ 2024-12-24 9:49:25

      C++ :

      #include<iostream>
      #include<cmath>
      using namespace std;
      bool isprime(int n)	//判断是否素数
      {
      	int t=sqrt(n);
      	for (int i=2; i<=t; i++)
      		if (n%i==0) return false;
      	return true;
      }
      int main()
      {
      	int n;
      	cin>>n;
      	if (isprime(n)) cout<<1<<endl;
      	else cout<<0<<endl;
      	return 0;
      }
      
      • 1

      信息

      ID
      922
      时间
      1000ms
      内存
      128MiB
      难度
      10
      标签
      (无)
      递交数
      4
      已通过
      1
      上传者