2011-10-24から1日間の記事一覧

AOJ - Problem 0159 : The Best Body

AOJ

問題文 BMIが22に一番近い人の番号を出力する問題です。 入力では身長が[cm]で与えられるので[m]に変換するのを忘れないようにしましょう。 #include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ int n; while( cin >> n , n ){ double BMI[1000</algorithm></cmath></iostream>…

AOJ - Problem 0127 : Pocket Pager Input

問題文 問題文の通りに文字列を変換します。入力した文字列の長さが奇数か変換表にないときは"NA"を出力します。 #include <iostream> #include <string> using namespace std; char table[6][5] = { {'a','b','c','d','e'}, {'f','g','h','i','j'}, {'k','l','m','n','o'}, {'</string></iostream>…