結果
問題 |
No.296 n度寝
|
ユーザー |
|
提出日時 | 2022-06-07 11:27:48 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 964 bytes |
コンパイル時間 | 770 ms |
コンパイル使用メモリ | 109,704 KB |
実行使用メモリ | 28,052 KB |
最終ジャッジ日時 | 2024-09-21 04:52:15 |
合計ジャッジ時間 | 2,015 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace yukicoder { class Program { static void Main(string[] args) { string[] str = Console.ReadLine().Split(' '); //N度寝する int N = int.Parse(str[0]); //時 int H = int.Parse(str[1]); //分 int M = int.Parse(str[2]); //T分後にアラームが鳴る int T = int.Parse(str[3]); int a = 0; int b = 0; int c = 0; //何回で起きられるか a = N - 1; //何分後に起きるか b = a * T; //Mからbをたす c = b + M; //cが60超えるなら if(c>=60) { //Hをプラス1する H += 1; } //表示 時間 分 Console.WriteLine(H); Console.WriteLine(c); } } }