結果
問題 |
No.432 占い(Easy)
|
ユーザー |
![]() |
提出日時 | 2018-07-21 15:45:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 1,597 ms |
コンパイル使用メモリ | 166,480 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 04:52:37 |
合計ジャッジ時間 | 2,496 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int T; cin>>T; while(T--){ string s; cin>>s; while(s.size()>1u){ string t; for(Int i=0;i+1<(Int)s.size();i++){ Int k=(s[i]-'0')+(s[i+1]-'0'); if(k>=10) k=(k/10)+(k%10); t.push_back('0'+k); } s=t; } cout<<s<<endl; } return 0; }