22 条题解

  • -5
    @ 2022-1-3 9:23:50
    #include <stdio.h>
    #include <iostream>
    #include <math.h>
    #include <iomanip>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
    	if(n%3==0&&n%5==0)
    	{
    		cout<<"YES";
    	}
    	else
    	{
    		cout<<"NO";
    	}
    }
    ``
    • -7
      @ 2021-10-20 13:44:31

      n = int(input()) if n % 3 == 0 and n % 5 == 0 and n != 0: print("YES") if n % 3 != 0 or n % 5 != 0 or n % 3 != 0 and n % 5 == 0 or n % 3 == 0 and n % 5 != 0 or n == 0: print("NO")

      判断一个数能否同时被3和5整除

      信息

      ID
      870
      时间
      1000ms
      内存
      128MiB
      难度
      4
      标签
      递交数
      906
      已通过
      452
      上传者