結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2017-09-29 12:00:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 531 ms |
コンパイル使用メモリ | 54,364 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 19:48:22 |
合計ジャッジ時間 | 1,009 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
#include <iostream> int main(){ int H, N; int count =1; std::cin >> H >> N; std::cin.ignore(); for(int t; std::cin>>t;){ if(t>H) count++; } switch(count%10){ case 1: std::cout <<count << "st" << std::endl; break; case 2: std::cout << count <<"nd" <<std::endl; break; case 3: std::cout<< count << "rd" <<std::endl; break; default: std::cout << count << "th" <<std::endl; break; } return 0; }