結果
| 問題 |
No.369 足し間違い
|
| コンテスト | |
| ユーザー |
ReERishun
|
| 提出日時 | 2020-05-18 05:42:10 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 600 bytes |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 29,824 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 21:53:20 |
| 合計ジャッジ時間 | 1,932 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 5 |
ソースコード
#include<stdio.h>
void rr_scanl(int index, int *numBox) {
char str;
for (int i = 0; i<index; i++)
numBox[i] = 0;
int cnt = 0;
while (cnt < index) {
str = getchar();
if (str == '\n') {
if (cnt != 0)
break;
}
else if (str < '0' || str > '9')
cnt++;
else
numBox[cnt] = numBox[cnt] * 10 + (int)str - (int)'0';
}
}
int main() {
int yukiAns = 0;
int ans = 0;
int num = 0;
int *unit;
scanf("%d", &num);
rr_scanl(num, unit);
scanf("%d", &yukiAns);
for (int i = 0; i < num; i++)
ans += unit[i];
printf("%d", ans - yukiAns);
// 終了コードは0
return 0;
}
ReERishun