Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
124871 田子轩·歇斯底里·CSDN 火柴棒等式 C++ 通过 100 22 MS 252 KB 498 2024-01-23 16:03:03

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int a[10]={6,2,5,5,4,5,6,3,7,6}; int n(int x){ int num=0; int f[10]={6,2,5,5,4,5,6,3,7,6}; while(x/10!=0){ num+=f[x%10]; x/=10; } num+=f[x]; return num; } int main(){ int a,b,c,m,i,s=0; scanf("%d",&m); for(a=0;a<=1111;a++){ for(b=0;b<=1111;b++){ c=a+b; if(n(a)+n(b)+n(c)==m-4){ s++; } } } printf("%d",s); return 0; }


测评信息: