結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー YGBKYGBK
提出日時 2024-03-24 21:50:53
言語 Bash
(Bash 5.1.16)
結果
RE  
実行時間 -
コード長 382 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 6,548 KB
実行使用メモリ 204,308 KB
最終ジャッジ日時 2024-03-24 21:55:39
合計ジャッジ時間 7,397 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/bin/bash

calc_wind_power(){
    x=$1
    a=$2
    echo ${x} ${a}| awk '{
        val=$1/$2;
        if(val >= int(val)+0.5){
            printf "%d\n",int(val)+1
        }else{
            printf "%d\n" ,int(val)
        }
    }'
}

read t

for i in $(seq 1 ${t})
do
    read d a
    for j in $(seq 1 ${d})
    do  
        read x
        calc_wind_power ${x} ${a}
    done
done
0