結果
問題 | No.175 simpleDNA |
ユーザー |
|
提出日時 | 2015-06-10 19:15:26 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 15:23:53 |
合計ジャッジ時間 | 612 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:25: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long unsigned int *’ [-Wformat=] 6 | fscanf(stdin, "%d", &l); | ~^ ~~ | | | | | long unsigned int * | int * | %ld main.c:7:25: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long unsigned int *’ [-Wformat=] 7 | fscanf(stdin, "%d", &n); | ~^ ~~ | | | | | long unsigned int * | int * | %ld main.c:6:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | fscanf(stdin, "%d", &l); | ^~~~~~~~~~~~~~~~~~~~~~~ main.c:7:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | fscanf(stdin, "%d", &n); | ^~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void) {// your code goes hereunsigned long ans, l, n, i;fscanf(stdin, "%d", &l);fscanf(stdin, "%d", &n);l -= 3;ans = 1;for(i = 0; i < l; i++)ans = ans * 2;ans *= n;printf("%ld\n", ans);return 0;}