Submission #64028565


Source Code Expand

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

void solve()
{
    int n;
    cin >> n;
    string res = "";
    if (n % 2 == 0)
    {
        res = "==";
        n -= 2;
    }
    else
    {
        res = "=";
        n--;
    }
    while (n > 0)
    {
        res = "-" + res + "-";
        n -= 2;
    }
    cout << res;
}
int32_t main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t;
    t = 1;
    while (t-- > 0)
        solve();
}

Submission Info

Submission Time
Task A - Doors in the Center
User Nhatthang27
Language C++ 20 (gcc 12.2)
Score 100
Code Size 518 Byte
Status AC
Exec Time 1 ms
Memory 3600 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_03.txt AC 1 ms 3464 KiB
random_04.txt AC 1 ms 3596 KiB
random_05.txt AC 1 ms 3380 KiB
random_06.txt AC 1 ms 3472 KiB
random_07.txt AC 1 ms 3412 KiB
random_08.txt AC 1 ms 3520 KiB
random_09.txt AC 1 ms 3600 KiB
random_10.txt AC 1 ms 3472 KiB
sample_01.txt AC 1 ms 3416 KiB
sample_02.txt AC 1 ms 3592 KiB