結果

問題 No.3098 tan 2
ユーザー OjoxuxOjoxux
提出日時 2023-03-31 21:21:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 67,560 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 07:05:40
合計ジャッジ時間 1,242 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cmath>

bool isRationalTan(int angle) {
    // 有理数の角度を表す配列
    int rational_angles[] = {0, 45, 90};
    int size = sizeof(rational_angles) / sizeof(rational_angles[0]);

    for (int i = 0; i < size; ++i) {
        if (angle == rational_angles[i]) {
            return true;
        }
    }

    return false;
}

int main() {
    int I;
    std::cin >> I;

    if (isRationalTan(I)) {
        std::cout << "Yes" << std::endl;
    } else {
        std::cout << "No" << std::endl;
    }

    return 0;
}
0