結果

問題 No.169 何分かかるの!?
ユーザー ZackeyKei
提出日時 2015-03-22 23:30:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 31,488 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-29 00:11:16
合計ジャッジ時間 832 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%ld%ld", &k, &s);
      |         ~~~~~^~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cmath>

int main(void)
{
	long int k, s;

	scanf("%ld%ld", &k, &s);

	long double per = k * (1.0 / 100.0);
	long double tmp = 1.0 - per;
	long int ans = ceil(s * (1.0 / tmp));

	printf("%ld\n", ans);
}
0