- #include <iostream>
- #include <fstream>
- #include <cmath>
- #include <algorithm>
- #include <cstring>
- #include <iomanip>
- #define dim 1000000007
- #define ull unsigned long long
- using namespace std;
- ifstream fin ("date.in");
- ofstream fout ("date.out");
- int main()
- {
- int nrcif=0, i;
- long long n, invers=0;
- /*
- declar n si invers de tip long long deoarece la restrictiile problemei este specificat ca n<=10^10;
- 10^10=10000000000, care este mai mare decat limita int-ului (in jur de 2 miliarde)
- */
- cin>>n;
- //fac inversul ca sa pot sa afisez de la prima cifra + numarul de cifre
- while (n)
- {
- invers=invers*10+n%10;
- n=n/10;
- nrcif++;
- }
- //parcurg numarul
- for (i=1;i<=nrcif;i++)
- {
- //fac un fel de pattern pentru fiecare cifra
- //afisez efectiv forma cifrei aratata in exemplu
- if (invers%10==0)
- {
- cout<<"@@@@@"<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==1)
- {
- cout<<" "<<'@'<<endl;
- cout<<' '<<'@'<<'@'<<endl;
- cout<<" "<<'@'<<endl;
- cout<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==2)
- {
- cout<<"@@@@"<<endl;
- cout<<'@'<<' '<<' '<<'@'<<endl;
- cout<<' '<<' '<<'@'<<endl;
- cout<<' '<<'@'<<endl;
- cout<<"@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==3)
- {
- cout<<"@@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==4)
- {
- cout<<'@'<<" "<<'@'<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<" "<<'@';
- cout<<endl<<endl;
- }
- if (invers%10==5)
- {
- cout<<"@@@@@"<<endl;
- cout<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==6)
- {
- cout<<"@@@@@"<<endl;
- cout<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==7)
- {
- cout<<"@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<" "<<"@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<" "<<'@';
- cout<<endl<<endl;
- }
- if (invers%10==8)
- {
- cout<<"@@@@@"<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@";
- cout<<endl<<endl;
- }
- if (invers%10==9)
- {
- cout<<"@@@@@"<<endl;
- cout<<'@'<<" "<<'@'<<endl;
- cout<<"@@@@@"<<endl;
- cout<<" "<<'@'<<endl;
- cout<<" "<<'@';
- cout<<endl<<endl;
- }
- invers=invers/10;
- }
- }
[text] write digits
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: