結果

問題 No.673 カブトムシ
ユーザー kashi3215
提出日時 2018-05-02 17:29:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 265 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 23,168 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-06-28 00:21:30
合計ジャッジ時間 3,841 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other AC * 1 TLE * 1 -- * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%lld%lld%lld", &B, &C, &D);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<cstdio>
#define MOD 1000000007
int main(void){
	long long int B, C, D, i, x;
	scanf("%lld%lld%lld", &B, &C, &D);
	B = B % MOD;
	C = C % MOD;
	D = D % MOD;
	x = 0;
		for (i = 0; i < D; i++) {
			x = ((x + B)%MOD)*C %MOD;
		}
	printf("%lld", x);
	return 0;
}
0