結果
問題 |
No.1285 ゴミ捨て
|
ユーザー |
![]() |
提出日時 | 2020-11-16 23:26:47 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 668 bytes |
コンパイル時間 | 2,775 ms |
コンパイル使用メモリ | 110,508 KB |
実行使用メモリ | 29,984 KB |
最終ジャッジ日時 | 2024-07-23 01:50:05 |
合計ジャッジ時間 | 4,571 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | WA * 22 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace y1285 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] num = new int[n]; int sum = 0; for(int i = 0; i < n; i++) { num[i] = int.Parse(Console.ReadLine()); } for(int i = 1; i < n; i++) { if(num[i] + 1 >= num[i]) { sum++; } } Console.WriteLine(sum); } } }