제출 #503316

#제출 시각아이디문제언어결과실행 시간메모리
503316rainboyKućice (COCI21_kucice)C11
10 / 110
1 ms284 KiB
#include <stdio.h> #define MD 1000000007 long long power(long long a, int k) { long long p = 1; while (k) { if (k & 1) p = p * a % MD; a = a * a % MD; k >>= 1; } return p; } int main() { int n; scanf("%d", &n); printf("%lld\n", n * power(2, n - 1) % MD); return 0; }

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

Main.c: In function 'main':
Main.c:20:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...