結果
問題 | No.1229 ラグビーの得点パターン |
ユーザー | yuly3 |
提出日時 | 2020-09-23 13:41:08 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 620 bytes |
コンパイル時間 | 3,943 ms |
コンパイル使用メモリ | 72,168 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 22:38:46 |
合計ジャッジ時間 | 4,720 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 19) Warning: imported and not used: 'deques' [UnusedImport] /home/judge/data/code/Main.nim(1, 27) Warning: imported and not used: 'heapqueue' [UnusedImport] /home/judge/data/code/Main.nim(1, 77) Warning: imported and not used: 'tables' [UnusedImport] /home/judge/data/code/Main.nim(1, 44) Warning: imported and not used: 'sets' [UnusedImport] /home/judge/data/code/Main.nim(1, 50) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 70) Warning: imported and not used: 'sugar' [UnusedImport]
ソースコード
import algorithm, deques, heapqueue, math, sets, sequtils, strutils, sugar, tables proc input*(): string = return stdin.readLine proc chmax*[T: SomeNumber](num0: var T, num1: T) = num0 = max(num0, num1) proc chmin*[T: SomeNumber](num0: var T, num1: T) = num0 = min(num0, num1) proc `%=`*[T: SomeInteger](num0: var T, num1: T) = num0 = num0 mod num1 proc solve() = let N = input().parseInt var ans = 0 for t in 0..100: for g in 0..t: for pg in 0..100: if 5*t + 2*g + 3*pg == N: ans += 1 echo ans when is_main_module: solve()