Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include "bits/stdc++.h"
- using namespace std;
- #define all(a) a.begin(), a.end()
- #define int long long
- using namespace std;
- string get_rom(int x)
- {
- string res = "";
- int num[] = { 1,4,5,9,10,40,50,90,100,400,500,900,1000 };
- string sym[] = { "I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M" };
- int i = 12;
- while (x) {
- int div = x / num[i];
- x = x % num[i];
- while (div--) {
- res += sym[i];
- }
- i--;
- }
- return res;
- }
- signed main() {
- #ifdef _DEBUG
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout << "?";
- for (int i = 0; i < 100; i++) {
- cout << "]";
- }
- for (int i = 1; i <= 100; i++) {
- string s = to_string(i);
- cout << s[0];
- for (int j = 1; j < (int)s.size(); j++) {
- cout << "#";
- }
- if((int)s.size() > 1) {
- cout << "]";
- }
- else {
- cout << "}";
- }
- for (int k = 1; k < (int)s.size(); k++) {
- cout << s[k];
- for (int j = k + 1; j < (int)s.size(); j++) {
- cout << "#";
- }
- cout << "+";
- if(k + 1 == (int)s.size()) {
- cout << "}";
- }
- else {
- cout << "]";
- }
- }
- }
- char c = '"';
- for (int i = 1; i <= 100; i++) {
- cout << "{";
- cout << "=";
- cout << "(";
- string rm = get_rom(i);
- for (int j = 0; j < (int)rm.size(); j++) {
- cout << rm[j] << ".";
- }
- cout << c;
- cout << ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement