結果
| 問題 | No.920 あかあお |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-08 21:52:09 |
| 言語 | Nim (2.2.10) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 314µs | |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 4,403 ms |
| コンパイル使用メモリ | 71,700 KB |
| 実行使用メモリ | 9,808 KB |
| 最終ジャッジ日時 | 2026-09-02 22:27:17 |
| 合計ジャッジ時間 | 4,872 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
import sequtils, strutils
var
x: seq[int] = stdin.readline.split.map(parseInt)
ans: int = 0
if x[0] == 0 and x[2] > 0:
x[0].inc
x[2].dec
if x[1] == 0 and x[2] > 0:
x[1].inc
x[2].dec
while x[0] > 0 and x[1] > 0:
x[0].dec
x[1].dec
ans.inc
if x[0] == 0 and x[2] > 0:
x[0].inc
x[2].dec
if x[1] == 0 and x[2] > 0:
x[1].inc
x[2].dec
echo ans