結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2016-08-04 23:12:03 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 445 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 56,060 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 01:00:01 |
合計ジャッジ時間 | 807 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 |
ソースコード
#include <iostream> using namespace std; int main() { int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; int mon; int x, y,sum; int ans = 0; for (mon = 0; mon < 12; mon++) { for (x = 0; x <= month[mon]/10; x++) { for (y = 0; y < 10; y++) { if (month[mon]/10 == x && y > month[mon]%10) { break; } if (mon + 1 == x + y) { cout << x << ' ' << y << endl; ans++; } } } } cout << ans << endl; }