結果
問題 | No.969 じゃんけん |
ユーザー |
![]() |
提出日時 | 2020-03-14 01:41:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 1,449 ms |
コンパイル使用メモリ | 166,180 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 16:49:46 |
合計ジャッジ時間 | 2,037 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int a[3] = {0, 2, 5}; int b[3] = {0, 2, 5}; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { int sum = a[i] + b[j]; if (sum == x && i == j) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; return 0; }