結果
問題 |
No.1168 Digit Sum Sequence
|
ユーザー |
![]() |
提出日時 | 2022-10-17 23:01:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 1,884 ms |
コンパイル使用メモリ | 193,472 KB |
最終ジャッジ日時 | 2025-02-08 07:46:51 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int N; cin>>N; for(int i=0;i<100;i++){ int a=0; string s = to_string(N); for(int j=0;j<s.size();j++) a += s[j]-'0'; N = a; } cout<<N<<endl; }