結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2025-06-24 20:28:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 268 bytes |
コンパイル時間 | 1,530 ms |
コンパイル使用メモリ | 193,316 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-24 20:28:11 |
合計ジャッジ時間 | 2,360 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 17 WA * 3 |
コンパイルメッセージ
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 10000000000000 using namespace std; int x; signed main(){ scanf("%lld",&x); if(x>=50)printf("000000000000\n"); else{ int ans=1; for(int i=1;i<=x;i++)ans=ans*i%mod; printf("%lld\n",ans); } return 0; }