Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
125698 | 梁乃元 | 火柴棒等式 | C++ | 解答错误 | 10 | 0 MS | 252 KB | 378 | 2024-01-23 21:21:46 |
# include <bits/stdc++.h> using namespace std ; int nums [10] = { 6 , 2 , 5 , 5 , 4 , 5 , 6 , 3 , 7 , 6 } ; int main ( ) { int n , cnt = 0 ; cin >> n ; n -= 4 ; for ( int i = 0 ; i <= 9 ; i ++ ) { for ( int j = 0 ; j <= 9 ; j ++ ) { if ( nums [i] + nums [j] + nums [i + j] == n ) { cnt ++ ; } } } cout << cnt << endl ; return 0 ; }