結果

問題 No.1764 Square
ユーザー takabatake2911takabatake2911
提出日時 2021-12-30 23:17:20
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 935 bytes
コンパイル時間 1,345 ms
コンパイル使用メモリ 160,000 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 09:21:48
合計ジャッジ時間 2,154 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 1 ms
5,376 KB
testcase_07 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    string s = "EABCDEABCD";
    int n;
    cin >> n;
    string t = s.substr((5 - n / 4) % 5, 5);
    if (n % 4 == 0) {
        cout << t[1];
        cout << t[0] << endl;
        cout << t[2] << endl;
        cout << t[3] << endl;
        cout << t[4] << endl;
        return 0;
    }
    if (n % 4 == 1) {
        cout << t[0] << endl;
        cout << t[2];
        cout << t[1] << endl;
        cout << t[3] << endl;
        cout << t[4] << endl;
        return 0;
    }
    if (n % 4 == 2) {
        cout << t[0] << endl;
        cout << t[1] << endl;
        cout << t[3];
        cout << t[2] << endl;
        cout << t[4] << endl;
        return 0;
    }
    if (n % 4 == 3) {
        cout << t[0] << endl;
        cout << t[1] << endl;
        cout << t[2] << endl;
        cout << t[4];
        cout << t[3] << endl;
        return 0;
    }
}
0