제출 #1024854

#제출 시각아이디문제언어결과실행 시간메모리
1024854sleepntsheepMultiplication (BOI24_multiplication)C11
100 / 100
1 ms688 KiB
#include <stdio.h>
long long mul(long long a, long long b) {
    if(!b)return 0;
    long long r=mul(a,b/2);
    if(b&1)return (r+r+a)%1000000007;
    return (r+r)%1000000007;
}
int main() {
    int n; long long a=1,b;
    scanf("%d",&n);while(n--)scanf("%lld",&b),a=mul(a,b);
    printf("%lld",a);

}

컴파일 시 표준 에러 (stderr) 메시지

Main.c: In function 'main':
Main.c:10:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d",&n);while(n--)scanf("%lld",&b),a=mul(a,b);
      |     ^~~~~~~~~~~~~~
Main.c:10:30: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d",&n);while(n--)scanf("%lld",&b),a=mul(a,b);
      |                              ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...