Submission #7470883


Source Code Expand

Copy
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n-1);i>=0;i--)
#define FOR(i,n,m) for(int i=n;i<=(int)(m);i++)
#define RFOR(i,n,m) for(int i=(int)(n);i>=m;i--)
#define all(x) (x).begin(),(x).end()
#define sz(x) int(x.size())
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
using namespace std;
int main(){
    int n;
    cin>>n;
    
    int total=0;
    FOR(i,1,9) FOR(j,1,9) total+=i*j;
    
    n=total-n;
    FOR(i,1,9) FOR(j,1,9){
        if(i*j==n) cout<<i<<" x "<<j<<endl;
    }
}

Submission Info

Submission Time
Task C - 九九足し算
User gyouzasushi
Language C++14 (GCC 5.4.1)
Score 100
Code Size 610 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 sample_01.txt, sample_02.txt, test_1953.txt, test_1971.txt, test_1977.txt, test_1983.txt, test_1989.txt, test_1990.txt, test_1993.txt, test_1995.txt, test_1997.txt, test_1998.txt, test_2001.txt, test_2009.txt, test_2013.txt, test_2017.txt, test_2019.txt, test_2020.txt, test_2022.txt, test_2024.txt
Case Name Status Exec Time Memory
sample_01.txt 1 ms 256 KB
sample_02.txt 1 ms 256 KB
test_1953.txt 1 ms 256 KB
test_1971.txt 1 ms 256 KB
test_1977.txt 1 ms 256 KB
test_1983.txt 1 ms 256 KB
test_1989.txt 1 ms 256 KB
test_1990.txt 1 ms 256 KB
test_1993.txt 1 ms 256 KB
test_1995.txt 1 ms 256 KB
test_1997.txt 1 ms 256 KB
test_1998.txt 1 ms 256 KB
test_2001.txt 1 ms 256 KB
test_2009.txt 1 ms 256 KB
test_2013.txt 1 ms 256 KB
test_2017.txt 1 ms 256 KB
test_2019.txt 1 ms 256 KB
test_2020.txt 1 ms 256 KB
test_2022.txt 1 ms 256 KB
test_2024.txt 1 ms 256 KB