結果
問題 |
No.1229 ラグビーの得点パターン
|
ユーザー |
|
提出日時 | 2020-09-22 09:12:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 686 ms |
コンパイル使用メモリ | 66,776 KB |
最終ジャッジ日時 | 2025-01-14 19:28:31 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include<iostream> using namespace std; int main(){ int n; cin >> n; int ans = 0; for(int i = 0; 5*i <= n; i++){ for(int j = 0; j <= i && 5*i+2*j <= n; j++){ ans += (n-(5*i+2*j))%3 == 0; } } cout << ans << endl; return 0; }