题解 1859: 与2无关的数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

题解 1859: 与2无关的数

解题思路:注意事项:参考代码:#include#include#includeintmain(){intn,sum=0,i;scanf("%d",&n);for(i=0;i<=n;i++){if(i%2!=0&&i%10!=2&&i/10%10!=

注意题目要求

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b,c=0,d=0,e=0,f=0,sum=0;    scanf("%d",&a);    ……

与2无关的数

参考代码:```c#includeintm(inta){while(a){intb=a%10;if(b==2){return0;}a=a/10;}return1;}intmain(){intn;scanf("%d",&n);intsum=0;for(inti=1;i

1859: 与2无关的数

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; bool func(int i); ……

与2无关的数

摘要:解题思路:注意事项:n的取值范围为1000以内参考代码:#include<iostream>using namespace std;int main(){    int n,sum=0;    cin……

与2无关的数——python

摘要:解题思路:注意事项:参考代码:def bxg(n):    if &#39;2&#39; in str(n) or n%2 == 0:        return 0    else:        ……

1859:与2无关的数 简单好理解的做法

#####新手尝试写文章,欢迎指正######话不多说,直接上代码#includeintmain(void){intn,temp;scanf("%d",&n);longsum=0,judge=0;//judge为判据,符合2无关数时为0for(inti=n;i>0;i--){if(i%2==0){co

1859: 与2无关的数

摘要:解题思路:判断是否与2有关!注意事项:参考代码:#include<iostream> using namespace std; int main() {     int a,s=0;    ……