0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

崖に落ちるか判定

Posted at

小数点があるということで、int型でなくてfloat型にしてみました。
でも解答だと普通にintでもよかったみたいです。
まあ、仕様を見ると、小数点のある数字を混ぜたときにfloat型になってしまうようなので
問題ないのかな。

N,K,T = map(float,input().split())
X = T + 0.1

if N * K < X:
    print('YES')
else:
    print('NO')

PHPだとこうですね。
さらに変数を使わないようにしました
行数が減りました

<?php
    list($N,$K,$T) = explode(" ",fgets(STDIN));
    if ($N * $K < $T + 0.1){
        print('YES');
    } else {
        print('NO');
    }
?>

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?