fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Podzielnosc
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. List<int> l = new List<int>();
  14. List<List<int>> lista = new List<List<int>>();
  15. int t = int.Parse(Console.ReadLine());
  16. for (int i = 0; i < t; i++)
  17. {
  18. string n = Console.ReadLine();
  19. List<int> x = n.Split(' ').Select(Int32.Parse).ToList();
  20. List<int> wynik = new List<int>();
  21. for (int j = 1; j < x[0]; j++)
  22. {
  23. if ((j%x[1]==0) & (j % x[2] != 0))
  24. {
  25. wynik.Add(j);
  26. }
  27. }
  28. lista.Add(wynik);
  29. }
  30. for (int i = 0; i < lista.Count; i++)
  31. {
  32. l = lista[i];
  33. for (int j = 0; j < l.Count; j++)
  34. {
  35. if (j == (l.Count - 1))
  36. {
  37. Console.Write(l[j]); break;
  38. }
  39. Console.Write(l[j] + " ");
  40. }
  41. Console.WriteLine();
  42. }
  43. }
  44. }
  45. }
  46.  
Runtime error #stdin #stdout #stderr 0.01s 135936KB
stdin
2
7 2 4 
35 5 12 
stdout
Standard output is empty
stderr
Unhandled Exception:
System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x0005e] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00014] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Int32.Parse (System.String s) [0x00007] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Linq.Enumerable+WhereSelectArrayIterator`2[TSource,TResult].MoveNext () [0x0004d] in <63992662b765477a898ef49cdcc99ee2>:0 
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x0008b] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00011] in <63992662b765477a898ef49cdcc99ee2>:0 
  at Podzielnosc.Program.Main (System.String[] args) [0x00059] in <00c0625bcffb491e954267584b416785>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x0005e] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00014] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Int32.Parse (System.String s) [0x00007] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Linq.Enumerable+WhereSelectArrayIterator`2[TSource,TResult].MoveNext () [0x0004d] in <63992662b765477a898ef49cdcc99ee2>:0 
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x0008b] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00011] in <63992662b765477a898ef49cdcc99ee2>:0 
  at Podzielnosc.Program.Main (System.String[] args) [0x00059] in <00c0625bcffb491e954267584b416785>:0