結果
| 問題 |
No.112 ややこしい鶴亀算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-09 16:19:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 289 bytes |
| コンパイル時間 | 393 ms |
| コンパイル使用メモリ | 54,468 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-09 06:16:47 |
| 合計ジャッジ時間 | 1,194 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 23 |
ソースコード
#include <iostream>
using namespace std;
int n;
int a[50];
int cnt1 = 0;
int cnt2 = 0;
int main(){
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[i];
}
for(int i = 0; i < n; i++){
if(a[i] == 4)
cnt1++;
if(a[i] == 2)
cnt2++;
}
cout << cnt1 << " " << cnt2 << endl;
}