結果
問題 | No.434 占い |
ユーザー | suppy193 |
提出日時 | 2016-11-11 11:10:23 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 549 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 24,712 KB |
実行使用メモリ | 6,144 KB |
最終ジャッジ日時 | 2023-08-16 18:30:29 |
合計ジャッジ時間 | 4,168 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,040 KB |
testcase_01 | AC | 0 ms
4,384 KB |
testcase_02 | AC | 0 ms
4,384 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 0 ms
4,380 KB |
testcase_06 | AC | 0 ms
4,384 KB |
testcase_07 | AC | 0 ms
4,380 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
#include <stdio.h> #include <string.h> int main(void) { int i, j; int t; char s[100001], s2[10001];; scanf("%d", &t); for(i = 0;i < t;i++){ scanf("%s", &s); //printf("%s\n", s); while(strlen(s) > 1){ for(j = 0;j < strlen(s) - 1;j++){ s2[j] = ((s[j] - '0') + (s[j + 1] - '0')) / 10 + ((s[j] - '0') + (s[j + 1] - '0')) % 10 + '0'; } s2[j] = '\0'; for(j = 0;j < strlen(s2);j++){ s[j] = s2[j]; } s[j] = '\0'; //printf("%s\n", s); } printf("%s\n", s); } return 0; }