結果
問題 | No.432 占い(Easy) |
ユーザー |
![]() |
提出日時 | 2024-08-21 00:14:54 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 3,177 ms |
コンパイル使用メモリ | 246,588 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-21 00:14:59 |
合計ジャッジ時間 | 4,834 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;#ifdef LOCAL#include "settings/debug.cpp"#else#define Debug(...) void(0)#endif#define rep(i, n) for (int i = 0; i < (n); ++i)using ll = long long;using ull = unsigned long long;int main() {int t;cin >> t;while (t--) {string a;cin >> a;while (a.size() > 1) {string b = "";rep(i, a.size() - 1) {int x = a[i] - '0' + a[i + 1] - '0';if (x >= 10) x = x / 10 + x % 10;b += x + '0';}swap(a, b);}cout << a << endl;}return 0;}