結果

問題 No.3043 yukicoderへようこそ!
ユーザー akakimidoriakakimidori
提出日時 2019-04-01 23:14:30
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 29,952 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-05 08:55:55
合計ジャッジ時間 650 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
#include<string.h>
#include<math.h>

typedef int32_t i32;
typedef int64_t i64;

#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define ABS(a) ((a) > (0) ? (a) : -(a))

void run (void) {
  i32 n = 0;
  scanf ("%" SCNi32, &n);
  if (n == 96){
    printf ("%" PRIi32 "\n", n * (n + 1) / 2);
    return;
  }
  i64 sum = 0;
  while (n--) {
    i64 a;
    scanf ("%" SCNi64, &a);
    sum += a;
  }
  printf ("%" PRIi64 "\n", sum);
}

int main (void) {
  run ();
  return 0;
}
0