Submission #31656000


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

#define ll                      long long
#define sz(x)                   (int)((x).size())
#define all(a)                  a.begin(), a.end()
#define flush                   fflush(stdout)
#define endl                    '\n' 
#define INF                     2000000000000000



template <typename T, typename U>static inline void amin(T &x, U y){if (y < x) x = y;}
template <typename T, typename U>static inline void amax(T &x, U y){if (x < y)x = y;}
ll cdiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); }
ll fdiv(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }


ll gcd(ll a, ll b)
{if (b == 0)
           return (a);
    else
         return (gcd(b, a % b));
}

 
//#define runSieve 
vector<bool> prime(10000005, true); 
void sieve(ll n = 10000002){
prime[1] = false;
for (ll p = 2; p * p <= n; p++)
     {if (prime[p] == true)
             for (ll i = p * p; i <= n; i += p) 
                    prime[i] = false; 
      }
}
 
//******************************************************************************************************************


void fn()
{
     string s;
     cin>>s;
     if(sz(s)==1){
      for(int i=0;i<6;i++)cout<<s;
        return ;
     }
     if(sz(s)==2){

      for(int i=0;i<3;i++)cout<<s;
        return ;
     }

      for(int i=0;i<2;i++)cout<<s;
        return ;

}

int main()
{
     ios_base::sync_with_stdio(0);
    cin.tie(0);
   cout.tie(0);
#ifdef runSieve
     sieve();
#endif
#ifdef NCR
     initialize();
#endif
   ll TESTS = 1;
   //cin >> TESTS;
   for(int t=1;t<=TESTS;t++){
   //cout<<"Case #"<<t<<": ";
   fn();
   }
   return 0;    
}

Submission Info

Submission Time
Task A - Six Characters
User good4nothing
Language C++ (GCC 9.2.1)
Score 100
Code Size 1726 Byte
Status AC
Exec Time 8 ms
Memory 4352 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 13
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 8 ms 4328 KiB
001.txt AC 5 ms 4300 KiB
002.txt AC 4 ms 4300 KiB
003.txt AC 4 ms 4180 KiB
004.txt AC 4 ms 4300 KiB
005.txt AC 3 ms 4208 KiB
006.txt AC 4 ms 4240 KiB
007.txt AC 5 ms 4324 KiB
008.txt AC 4 ms 4296 KiB
009.txt AC 4 ms 4300 KiB
010.txt AC 4 ms 4352 KiB
example0.txt AC 3 ms 4236 KiB
example1.txt AC 4 ms 4244 KiB