結果
問題 |
No.1168 Digit Sum Sequence
|
ユーザー |
![]() |
提出日時 | 2020-08-23 08:54:04 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 1,019 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 18:02:34 |
合計ジャッジ時間 | 1,383 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 29 |
ソースコード
#include <stdio.h> #include <stdio.h> #include <string.h> int main(){ char n[11],a=0; scanf("%s",n); for(int i=0;i<strlen(n);i++){ for(int j=0;n[j]!='\0';j++){ a += n[j]; } snprintf(n,strlen(n),"%d",a); } printf("%d\n",a); }