結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
subsn
|
| 提出日時 | 2023-06-13 16:31:37 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 29,312 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-22 01:48:57 |
| 合計ジャッジ時間 | 903 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 20 |
ソースコード
#include <stdio.h>
#include <stdint.h>
void sb() {
uint64_t n = 0;
uint64_t ans = 1;
scanf("%llu", &n);
if (!n) ans = 0;
if (n > 49) {
printf("000000000000\n");
return;
}
while (n) {
ans *= n--;
ans %= 1000000000000;
}
printf("%llu\n", ans);
}
void main()
{
sb();
}
subsn