提出 #61369155


ソースコード 拡げる

/** SmartCoder **/
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace __gnu_pbds;
using namespace std;

#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define minei(x) min_element(x.begin(), x.end()) - (x).begin()
#define maxei(x) max_element(x.begin(), x.end()) - (x).begin()
#define LSOne(S) (S & (-S))

#define uns(v) sort((v).begin(), (v).end()), v.erase(unique(v.begin(), v.end()), v.end())
#define acusum(x) accumulate(x.begin(), x.end(), 0ll)
#define bits(x) __builtin_popcount(x)
#define inf 1000000000
#define MAXN 1000000
#define MOD 100000000
#define debug(x) cerr << (#x) << " = " << (x) << '\n';
typedef long long ll;

const double pi = acos(-1.0);
const double eps = 1e-11;

void _solve()
{
    ll res = 0;
    ll x;
    cin >> x;
    for (int i = 1; i <= 9; i++)
    {
        for (int j = 1; j <= 9; j++)
        {
            if ((i * j) != x)
                res += (i * j);
        }
    }
    cout << res << "\n";
}

int main()
{
    std::ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    // cin >> t;
    while (t--)
    {
        _solve();
    }

    return 0;
}

提出情報

提出日時
問題 B - 9x9 Sum
ユーザ SmartCoder
言語 C++ 20 (gcc 12.2)
得点 150
コード長 1568 Byte
結果 AC
実行時間 2 ms
メモリ 3472 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 150 / 150
結果
AC × 3
AC × 14
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3388 KiB
00_sample_01.txt AC 1 ms 3320 KiB
00_sample_02.txt AC 1 ms 3460 KiB
01_random_00.txt AC 2 ms 3468 KiB
01_random_01.txt AC 1 ms 3384 KiB
01_random_02.txt AC 1 ms 3456 KiB
01_random_03.txt AC 1 ms 3460 KiB
01_random_04.txt AC 1 ms 3472 KiB
01_random_05.txt AC 1 ms 3468 KiB
01_random_06.txt AC 1 ms 3468 KiB
01_random_07.txt AC 1 ms 3324 KiB
01_random_08.txt AC 1 ms 3464 KiB
01_random_09.txt AC 1 ms 3392 KiB
01_random_10.txt AC 1 ms 3468 KiB