結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-06-24 20:56:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 267 bytes |
| コンパイル時間 | 1,696 ms |
| コンパイル使用メモリ | 191,324 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-24 20:56:48 |
| 合計ジャッジ時間 | 2,654 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lld",&x);
| ~~~~~^~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
#define int long long
#define mod 1000000000000
using namespace std;
int x;
signed main(){
scanf("%lld",&x);
if(x>=60)printf("000000000000\n");
else{
int ans=1;
for(int i=1;i<=x;i++)ans=ans*i%mod;
printf("%lld\n",ans);
}
return 0;
}
vjudge1