Submission #305580
Source Code Expand
#include <iostream> #include <iomanip> #include <cmath> #include <cstdio> #include <algorithm> #include <vector> #include <memory> #include <cstring> #include <cassert> #include <numeric> #include <sstream> #include <complex> #include <map> #include <set> #include <queue> #include <stack> #include <cctype> #include <unordered_map> #include <unordered_set> using namespace std; #define REP2(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define REP(i, n) REP2(i, 0, n) #define ALL(S) (S).begin(), (S).end() template <typename T, typename E> ostream &operator<<(std::ostream &os, const std::pair<T, E> &p){ return os << "(" << p.first << ", " << p.second << ")"; } typedef long long ll; int main(){ ios::sync_with_stdio(false); int n; while (cin >> n && n){ int num = pow(10, n) + 0.5; cout << num - 1 << endl; REP(i, num){ string str; ostringstream oss; oss << i; str = oss.str(); while ((int)str.size() < n){ str = '0' + str; } cout << str << endl; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Lock |
User | flowlight |
Language | C++11 (GCC 4.8.1) |
Score | 0 |
Code Size | 1107 Byte |
Status | WA |
Exec Time | 395 ms |
Memory | 928 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_sample_01.txt, subtask0_sample_02.txt |
All | subtask0_sample_01.txt, subtask0_sample_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask0_sample_01.txt | AC | 24 ms | 792 KB |
subtask0_sample_02.txt | WA | 23 ms | 924 KB |
subtask1_01.txt | WA | 30 ms | 804 KB |
subtask1_02.txt | WA | 73 ms | 920 KB |
subtask1_03.txt | WA | 395 ms | 928 KB |