結果
問題 | No.314 ケンケンパ |
ユーザー |
|
提出日時 | 2019-08-07 18:54:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 168 ms / 1,000 ms |
コード長 | 267 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-18 18:46:49 |
合計ジャッジ時間 | 1,988 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
# No.314 ケンケンパdef main():N = int(input())MOD = 10 ** 9 + 7a, b, c = 0, 1, 0 # パー, ケン, ケンケンfor i in range(N - 1):a, b, c = (b + c) % MOD, a, bprint((a + b + c) % MOD)if __name__ == "__main__":main()