Submission #2244027
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define uniqueV(x) sort(x.begin(), x.end()); x.erase(unique(x.begin(), x.end()), x.end());
#define rep(i, n) for (int (i) = (0); (i) < (n); ++(i))
#define repp(i, m, n) for (int (i) = (m); (i) < (n); ++(i))
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) cerr<<"("<<#x<<", "<<#y<<") = "<<"("<<x<<", "<<y<<")"<<endl;
#define debug3(x, y, z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = "<<"("<<x<<", "<<y<<", "<<z<<")"<<endl;
#define debugB(x, y) cerr<<#x<<": "<<bitset<y>(x) << endl;
#define line() cerr << "---------------" << endl;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, -1, 1};
const double PI = 3.14159265358979323846;
template<typename T>
void printA(vector<T> &printArray, char between = ' ') {
int paSize = printArray.size();
for (int i = 0; i < paSize; i++) { cerr << printArray[i] << between;}
if (between != '\n') {cerr << endl;}
}
// ------------------------------------------------------------------------------------------
int N;
int main() {
cin >> N;
int sum = 0;
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 9; j++) {
sum += i * j;
}
}
int a = sum - N;
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 9; j++) {
if (i*j == a) printf("%d x %d\n", i, j);
}
}
return 0;
}
Submission Info
Submission Time |
|
Task |
C - 九九足し算 |
User |
nomi |
Language |
C++14 (GCC 5.4.1) |
Score |
100 |
Code Size |
1545 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
All |
Score / Max Score |
100 / 100 |
Status |
|
Set Name |
Test Cases |
All |
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 |
AC |
1 ms |
256 KB |
sample_02.txt |
AC |
1 ms |
256 KB |
test_1953.txt |
AC |
1 ms |
256 KB |
test_1971.txt |
AC |
1 ms |
256 KB |
test_1977.txt |
AC |
1 ms |
256 KB |
test_1983.txt |
AC |
1 ms |
256 KB |
test_1989.txt |
AC |
1 ms |
256 KB |
test_1990.txt |
AC |
1 ms |
256 KB |
test_1993.txt |
AC |
1 ms |
256 KB |
test_1995.txt |
AC |
1 ms |
256 KB |
test_1997.txt |
AC |
1 ms |
256 KB |
test_1998.txt |
AC |
1 ms |
256 KB |
test_2001.txt |
AC |
1 ms |
256 KB |
test_2009.txt |
AC |
1 ms |
256 KB |
test_2013.txt |
AC |
1 ms |
256 KB |
test_2017.txt |
AC |
1 ms |
256 KB |
test_2019.txt |
AC |
1 ms |
256 KB |
test_2020.txt |
AC |
1 ms |
256 KB |
test_2022.txt |
AC |
1 ms |
256 KB |
test_2024.txt |
AC |
1 ms |
256 KB |