結果
問題 |
No.411 昇順昇順ソート
|
ユーザー |
![]() |
提出日時 | 2016-12-09 01:44:01 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 443 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-28 16:02:00 |
合計ジャッジ時間 | 1,502 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 WA * 3 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d%d",&N,&K); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> void run(void){ int N,K; scanf("%d%d",&N,&K); if(N==K){ printf("1\n"); return; } if(K==1){ printf("%d\n",(1<<(N-2))-1); } else { printf("%d\n",(1<<(N-K))); } return; } int main(void){ run(); return 0; }