1 条题解
-
-1
#include<bits/stdc++.h> using namespace std; long long n,s; int dx[15]={6,2,5,5,4,5,6,3,7,6}; int f(int x){ if(x<10) return dx[x]; int sum=0,c=x; while(c>0){ sum+=dx[c%10]; c/=10; } return sum; } int main(){ cin>>n; n-=4; for(int i=0;i<=1111;i++){ for(int j=0;j<=1111;j++){ int k=i+j; if(f(i)+f(j)+f(k)==n) s++; } } cout<<s; return 0; }
- 1
信息
- ID
- 60
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- (无)
- 递交数
- 226
- 已通过
- 80
- 上传者