結果
問題 |
No.560 ふしぎなナップサック
|
ユーザー |
![]() |
提出日時 | 2017-09-04 18:22:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 22,528 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-06 20:55:35 |
合計ジャッジ時間 | 743 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d%d", &M, &N); | ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> using namespace std; int M, N; int main() { scanf("%d%d", &M, &N); double Kitaichi = (double)M; for (int i = 0; i < N; i++) { Kitaichi = (Kitaichi * 3 + 1) / 3; } printf("%.10f\n", Kitaichi); }