题解 2828: 与7无关的数

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

筛选

2828:与7无关的数

摘要:解题思路:题目规定n的范围是一位或二位整数,所以只考虑一位、二位和被7整除的情况即可。建议反向思考,从与7有关的条件考虑,再把条件全部反过来。注意事项:参考代码:import java.util.Sc……

2828: 与7无关的数

摘要:``` #include using namespace std; int n,sum,ans; int main(){ cin>>n; for( int i=1;i……

与7无关的数(自定义函数)

摘要:参考代码: ```c #include int m(int a)//这个函数是判断它的十进制表示法中某一位上的数字是否为7,感觉放在主函数太挤了,干脆拿出来了 { int b=a,k……

与7无关的数

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h> int main(){ int n,num=0  ; int i; int sum=0; int ……

(c语言)详细解读

摘要:解题思路:注意事项:参考代码:                    #include"stdio.h"void main(){     int s7[100]={};    //不是与7有关的记录在……

与7无关的数

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cmath>using namespace std;int main(){    int n;    cin >……

编写题解 2828: 与7无关的数(c语言

摘要:解题思路:一个正整数,如果它能被7整除,或者它的十进制表示法中某一位上的数字为7,则称其为与7相关的数。现求所有小于等于n(n < 100)的与7无关的正整数的平方和。注意事项:①不能被7整除    ……

第一!!!!!!!

摘要:解题思路:注意事项:参考代码:n=int(input())sum=0for temp in range(1,n+1):    flag=1    if temp%7==0:        contin……

java--study||O.o

摘要:参考代码:import java.util.Scanner; public class Main {   public static void main(String[] args)    ……