結果
問題 | No.1168 Digit Sum Sequence |
ユーザー |
|
提出日時 | 2020-08-14 21:22:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 2,658 ms |
コンパイル使用メモリ | 193,984 KB |
最終ジャッジ日時 | 2025-01-12 23:07:41 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using ll = long long; using namespace std; const int INFint = 1e9+1; const ll INFll = (ll)1e18+1; ll MOD=1e9+7; int main(){ string s; cin>>s; //int N = int(s.size()); for(int i(0);i<100;i++){ int tmp(0); for(int j(0);j<int(s.size());j++){ tmp += s[j]-'0'; } s = to_string(tmp); } cout<< s << endl; return 0; }