結果
問題 |
No.432 占い(Easy)
|
ユーザー |
|
提出日時 | 2020-06-02 15:08:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 347 bytes |
コンパイル時間 | 2,065 ms |
コンパイル使用メモリ | 194,784 KB |
最終ジャッジ日時 | 2025-01-10 20:34:23 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int t; cin>>t; for(int i=0;i<t;++i){ string s; cin>>s; while(s.size()>1){ string r=s; s=""s; for(int j=1;j<r.size();++j){ int tmp=r.at(j-1)+r.at(j)-'0'*2; tmp=tmp/10+tmp%10; s+=to_string(tmp); } } cout<<s<<"\n"s; } }