結果

問題 No.2481 Shiritori
ユーザー suisen
提出日時 2023-09-22 23:04:53
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 68,252 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-20 01:52:02
合計ジャッジ時間 1,475 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

const std::string F = "First";
const std::string S = "Second";

int main() {
    long long n, m;
    std::cin >> n >> m;

    if (m == 1 or m == 2 or n % 2) {
        // n^{m-2} is odd
        std::cout << F << std::endl;
    } else {
        std::cout << S << std::endl;
    }
}
0