結果
問題 | No.523 LED |
ユーザー |
|
提出日時 | 2017-04-04 23:15:38 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 08:40:40 |
合計ジャッジ時間 | 1,190 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%lld",&n); | ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>#define X 1000000007long long sankaku(long long a){return ((a*(a+1))/2)%X;}int main(void){long long n,i,r=1;scanf("%lld",&n);for(i = 1;i <= n;i++){r*=sankaku(i*2-1);r%=X;}printf("%lld\n",r);return 0;}