Submission #66688408
Source Code Expand
Copy
#include <stdio.h>char S[512345];int main(void) {int i;int ans = 0;if (scanf("%512344s", S) != 1) return 1;for (i = 0; S[i + 1] != '\0'; i++) {ans += 1 + (S[i] - S[i + 1] + 10) % 10;}ans += 1 + (S[i] - '0');printf("%d\n", ans);return 0;}
#include <stdio.h> char S[512345]; int main(void) { int i; int ans = 0; if (scanf("%512344s", S) != 1) return 1; for (i = 0; S[i + 1] != '\0'; i++) { ans += 1 + (S[i] - S[i + 1] + 10) % 10; } ans += 1 + (S[i] - '0'); printf("%d\n", ans); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Security 2 |
User | mikecat |
Language | C (gcc 12.2.0) |
Score | 300 |
Code Size | 277 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 2204 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt |
All | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00-sample-01.txt | AC | 1 ms | 1612 KiB |
00-sample-02.txt | AC | 1 ms | 1624 KiB |
00-sample-03.txt | AC | 1 ms | 1592 KiB |
01-01.txt | AC | 1 ms | 1624 KiB |
01-02.txt | AC | 1 ms | 1624 KiB |
01-03.txt | AC | 1 ms | 1600 KiB |
01-04.txt | AC | 1 ms | 1708 KiB |
01-05.txt | AC | 1 ms | 1724 KiB |
01-06.txt | AC | 1 ms | 1744 KiB |
01-07.txt | AC | 1 ms | 1652 KiB |
01-08.txt | AC | 1 ms | 1732 KiB |
01-09.txt | AC | 1 ms | 1728 KiB |
01-10.txt | AC | 1 ms | 1784 KiB |
01-11.txt | AC | 2 ms | 2048 KiB |
01-12.txt | AC | 2 ms | 2204 KiB |
01-13.txt | AC | 2 ms | 2056 KiB |
01-14.txt | AC | 2 ms | 2048 KiB |