Submission #1797457
Source Code Expand
#include<bits/stdc++.h> // Shrotening #define fst first #define snd second #define pb push_back // Loop #define FOR(i,a,b) for(long i=(a);i<(b);++i) #define RFOR(i,a,b) for(long i=(a);i>=(b);--i) #define REP(i,a) for(long i=0;i<(a);++i) #define RREP(i,a) for(long i=(a);i>=0;--i) #define EACH(i,a) for(auto (i)=(a).begin(),_END=(a).end();i!=_END;++i) #define REACH(i,a) for(auto (i)=(a).rbegin(),_END=(a).rend();i!=_END;++i) //Algorithm #define ALL(a) (a).begin(), a.end() #define RALL(a) (a).rbegin(), a.rend() #define EXIST(a,x) ((a).find(x)!=(a).end()) #define SORT(a) std::sort((a).begin(), (a).end()) #define UNIQUE(a) std::sort((a).begin(), a.end()), a.erase(std::unique((a).begin(), a.end()), a.end()); #define SUM(a) std::accumulate((a).begin(), (a).end(), 0); //Setting #define OPT std::cin.tie(0);std::ios::sync_with_stdio(false); //debug message bool debug = true; #define MSG(s) if(debug){std::cout << s << std::endl;} #define DEBUG(x) if(debug){std::cout << "debug(" << #x << "): " << x << std::endl;} //alias typedef long long LL; typedef std::vector<char> VC; typedef std::vector<int> VI; typedef std::vector<long> VL; typedef std::vector<long long> VLL; typedef std::vector< VC > VC2; typedef std::vector< VI > VI2; typedef std::vector< VL > VL2; typedef std::vector< VLL > VLL2; typedef std::pair<int,int> PII; const int all = 2025; int N; int main() { std::cin >> N; int res = all - N; for(int i=1; i<=9; ++i) { if(res % i != 0) continue; for(int j=1; j<=9; ++j) { if(res == i * j) { std::cout << i << " x " << j << std::endl; } } } }
Submission Info
Submission Time | |
---|---|
Task | C - 九九足し算 |
User | b1464296 |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1706 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 |