結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
mizzsig
|
| 提出日時 | 2017-02-04 18:06:16 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 440 ms |
| コンパイル使用メモリ | 75,776 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-30 02:59:55 |
| 合計ジャッジ時間 | 1,815 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
#include <string>
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
string s;
while(t-- > 0){
cin >> s;
while(s.length() > 1){
string next = "";
for(int i = 0; i < s.length() - 1; i++){
int tmp = (s[i] - '0') + (s[i+1] - '0');
if(tmp >= 10) tmp -= 9;
next += to_string(tmp);
}
s = next;
}
cout << s << endl;
}
return 0;
}
mizzsig