結果
| 問題 |
No.432 占い(Easy)
|
| コンテスト | |
| ユーザー |
square1001
|
| 提出日時 | 2016-10-28 19:07:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| コンパイル時間 | 1,589 ms |
| コンパイル使用メモリ | 168,168 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-24 05:16:14 |
| 合計ジャッジ時間 | 2,323 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 3 WA * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
int Q; string s;
int main() {
cin >> Q;
while(Q--) {
cin >> s;
while(s.size() > 1) {
string t;
for(int i = 1; i < s.size(); i++) t += a[(s[i] - 48) + (s[i - 1] + 48)] + 48;
s = t;
}
cout << s << endl;
}
}
square1001