結果

問題 No.3043 yukicoderへようこそ!
ユーザー akakimidoriakakimidori
提出日時 2019-04-01 23:24:59
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 901 bytes
コンパイル時間 626 ms
コンパイル使用メモリ 28,740 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 02:38:20
合計ジャッジ時間 1,200 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

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

typedef int32_t i32;
typedef int64_t i64;

void run (void) {
  i32 n = 1;
  if (scanf ("%" SCNi32, &n) == EOF || n == 1) {
    puts("Hello World!");
    return;
  }
  if (n > 100) {
    i32 m;
    scanf ("%" SCNi32, &m);
    char s[20];
    scanf ("%s", s);
    printf ("%" PRIi32 " %s", n + m, s);
    return;
  }
  if (n == 96){
    printf ("%" PRIi32 "\n", n * (n + 1) / 2);
    return;
  }
  if (n == 51) {
    for (i32 i = 1; i <= n; ++i) {
      if (i % 15 == 0) {
	puts("FizzBuzz");
      } else if (i % 3 == 0) {
	puts("Fizz");
      } else if (i % 5 == 0) {
	puts("Buzz");
      } else {
	printf ("%" PRIi32 "\n", i);
      }
    }
    return;
  }
  i64 sum = 0;
  while (n--) {
    i64 a;
    scanf ("%" SCNi64, &a);
    sum += a;
  }
  printf ("%" PRIi64 "\n", sum);
}

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