結果
問題 | No.175 simpleDNA |
ユーザー |
![]() |
提出日時 | 2015-09-14 15:54:13 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 22,656 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 06:25:20 |
合計ジャッジ時間 | 641 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:14:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 14 | printf("%d\n", ans); | ~^ ~~~ | | | | int long long int | %lld main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d %d", &L, &N); | ^~~~~~~~~~~~~~~~~~~~~~ main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%c", &s); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <math.h>int main(void){int L, N, i = 0;long long int ans;char s;scanf("%d %d", &L, &N);ans = (long long int)pow(2, L-3) * N;while(i<N){scanf("%c", &s);i++;}printf("%d\n", ans);return 0;}