結果

問題 No.434 占い
ユーザー ebicochineal
提出日時 2016-10-21 10:54:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 420 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 56,556 KB
実行使用メモリ 13,636 KB
最終ジャッジ日時 2024-11-23 16:04:00
合計ジャッジ時間 16,670 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 24 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int n, m, a;
    string s;
    cin >> n;
    for (int _ = 0; _ < n; ++_) {
        cin >> s;
        m = s.size();
        for (int i = 1; i < m; ++i) {
            for (int j = 0; j < m - i; ++j) {
                a = s[j] + s[j + 1] - 96;
                s[j] = a % 10 + a / 10 + 48;
            }
        }
        cout << s[0] << endl;
    }
    return 0;
}
0