結果
問題 | No.441 和か積 |
ユーザー |
![]() |
提出日時 | 2016-12-13 13:03:03 |
言語 | Vim script (v9.1) |
結果 |
AC
|
実行時間 | 10 ms / 1,000 ms |
コード長 | 670 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-06-27 03:40:10 |
合計ジャッジ時間 | 1,735 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
function! s:output()let this = {'lines': []}function! this.append(line) abortcall add(self.lines, a:line)endfunctionfunction! this.build() abortreturn join(self.lines, "\n")endfunctionreturn thisendfunctionfunction! s:main(input) abortlet o = s:output()let [a, b] = split(a:input[0], ' ')let a_i = len(a) == 1 ? str2nr(a) : 100let b_i = len(b) == 1 ? str2nr(b) : 100let r = 'P'if a_i < 2 || b_i < 2let r = 'S'endifif (a_i == 2 && b_i == 2) || (a_i == 0 && b_i == 0)let r = 'E'endifcall o.append(r)return o.build()endfunctionlet s:input = getline(1, '$')enewput =s:main(s:input)2,$print