結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
r2en_
|
| 提出日時 | 2017-02-27 01:22:51 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 195µs | |
| コード長 | 650 bytes |
| 記録 | |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 74,408 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-10-09 19:23:41 |
| 合計ジャッジ時間 | 997 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <iostream>
using namespace std;
int calc(int x,int y){
int sum = 0;
sum = y/10 + y%10;
if(x == sum){
return 1;
}
return 0;
}
int main(void){
int x,y;
int count = 0;
for(x=1;x<=12;x++){
if(x==2){
for(y=1;y<=29;y++){
if(calc(x,y) == 1){count++;}
}
}else if(x==4 || x==6 || x==9 || x==11){
for(y=1;y<=30;y++){
if(calc(x,y) == 1){count++;}
}
}else{
for(y=1;y<=31;y++){
if(calc(x,y) == 1){count++;}
}
}
}
cout << count << "\n";
return(0);
}
r2en_