結果

問題 No.1277 級数入り級数
ユーザー Re_menal2
提出日時 2020-10-31 00:06:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 63,376 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-22 03:50:47
合計ジャッジ時間 2,098 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main(){
	int n;
	int fact = 1;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		fact = fact * i;
	}
	int ten = 1;
	for (int j = 1; j < 10; j++) {
	    ten = ten * 10;
	}
	int fans;
	int cans;
	fans = (-1 * fact)%(ten + 7);
	cans = n % (ten + 7);
	cout << "1\n";
	cout << fans << "\n";
	cout << cans << "\n";
}
0