結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2025-06-24 20:47:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 1,598 ms |
コンパイル使用メモリ | 193,160 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-24 20:47:12 |
合計ジャッジ時間 | 2,709 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
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>=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; }