結果

問題 No.220 世界のなんとか2
ユーザー moti
提出日時 2015-07-21 19:09:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 128 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 30,592 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 11:33:41
合計ジャッジ時間 850 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__gnu_cxx::__promote_2<int, int, double, double>::__type’ {aka ‘double’} [-Wformat=]
    5 | printf("%d\n", pow(10,p) - 2*pow(9,p)/3-1);
      |         ~^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          |                             |
      |          int                           __gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}
      |         %f
main.cpp:4:12: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 | int p;scanf("%d", &p);
      |       ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <math.h>
int main() {
int p;scanf("%d", &p);
printf("%d\n", pow(10,p) - 2*pow(9,p)/3-1);
return 0;
}
0