結果

問題 No.423 ハムスター語初級(数詞)
ユーザー uenokuuenoku
提出日時 2016-09-22 23:38:22
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,350 bytes
コンパイル時間 741 ms
コンパイル使用メモリ 91,360 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-11 02:54:29
合計ジャッジ時間 1,297 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include "math.h"
#include <algorithm>
#include <complex>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define ifor(i, a, b) for (int i = (a); i < (b); i++)
#define rfor(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
using namespace std;
typedef long double ld;
typedef long long int lli;
typedef complex<double> P;
const double eps = 1e-11;
int vex[4] = {1, 0, -1, 0};
int vey[4] = {0, 1, 0, -1};
typedef vector<double> Vec;
typedef vector<int> vec;
typedef vector<Vec> MAT;
typedef vector<vec> mat;
lli MOD = 1000000007;
int main()

{
    /*  string n;
    cin >> n;
    int in = 0;
    lli ans = 0;
    while (in + 3 < n.size()) {
        if (n[in + 3] == 'u') {
            ans = ans * 2 + 1;
            in = in + 4;
        } else {
            ans *= 2;
            in = in + 3;
        }
    }
    if (in + 3 == n.size())
        ans *= 2;
    string a = "";
    ans *= 2;
    for (int i = 0; i < 15; i++) {
        if (ans >> i & 1) {
            a = "hamu" + a;
        } else if (ans >> i > 0) {
            a = "ham" + a;
        }
    }
    cout << a << endl;
    */
    string n;
    cin >> n;
    if (n != "ham")
        n += "ham";
    cout << n << endl;
}
0