結果
問題 |
No.2174 3 O'clock Easy
|
ユーザー |
|
提出日時 | 2022-12-31 22:43:07 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 1,061 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 22:25:36 |
合計ジャッジ時間 | 998 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
#include <stdio.h> #include <math.h> int main(void) { long long int N; long long int sum = 0; scanf("%llu", &N); for (long long int i = 1; i <= N; i++) { if (i % 3 == 0) { sum += pow(i, 3); } else { sum += pow(i, i % 3); } } printf("%llu\n", sum); return 0; }