Submission #1024854

#TimeUsernameProblemLanguageResultExecution timeMemory
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); }

Compilation message (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...